Created
July 3, 2014 19:21
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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