Skip to content

Instantly share code, notes, and snippets.

@AndersonIncorp
Created September 10, 2023 20:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AndersonIncorp/d0ae37510afb4a696d497b0e1c3ed259 to your computer and use it in GitHub Desktop.
Save AndersonIncorp/d0ae37510afb4a696d497b0e1c3ed259 to your computer and use it in GitHub Desktop.
lua script to get members of set then return hash for each key
https://gist.github.com/luke/dbca647bf07d1843ab47
local members = redis.call('SMEMBERS', KEYS[1])
local results = {}
for index, key in ipairs(members) do
results[index] = redis.call('HGETALL', KEYS[1] .. '/' .. key)
end
return results
1
accounts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment