Skip to content

Instantly share code, notes, and snippets.

@miguelcma
Last active August 29, 2015 14:15
Show Gist options
  • Save miguelcma/99db5474150d097057ad to your computer and use it in GitHub Desktop.
Save miguelcma/99db5474150d097057ad to your computer and use it in GitHub Desktop.
redis: pipelined (multi) atomic get and del
r.pipelined do
keys.each do |k|
r.multi do
values << r.get(k)
r.del(k)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment