Skip to content

Instantly share code, notes, and snippets.

@mrkvm
Created October 21, 2012 22:45
Show Gist options
  • Save mrkvm/3928806 to your computer and use it in GitHub Desktop.
Save mrkvm/3928806 to your computer and use it in GitHub Desktop.
-- iterate over Redis hash in Lua.
local results = redis.call("HGETALL", KEYS[1]);
if results ~= 0 then
for key, value in ipairs(results) do
-- do something here
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment