Skip to content

Instantly share code, notes, and snippets.

@luke
Created July 3, 2014 19:21
Show Gist options
  • Save luke/dbca647bf07d1843ab47 to your computer and use it in GitHub Desktop.
Save luke/dbca647bf07d1843ab47 to your computer and use it in GitHub Desktop.
lua script to get members of set then return hash for each key
EVAL "local members = redis.call('smembers',KEYS[1])\n local results = {}\n for index,key in ipairs(members) do results[index] = redis.call('hgetall',KEYS[1] .. '/' .. key) end \n return results" 1 accounts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment