Skip to content

Instantly share code, notes, and snippets.

@droot
Created June 19, 2011 07:27
Show Gist options
  • Save droot/1033870 to your computer and use it in GitHub Desktop.
Save droot/1033870 to your computer and use it in GitHub Desktop.
ZREVPOP Lua script for redis
val = redis.call('zrange', KEYS[1], -1, -1)
if val then redis.call('zremrangebyrank', KEYS[1], -1, -1) end
return val
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment