Skip to content

Instantly share code, notes, and snippets.

@serefyarar
Created July 10, 2016 18:58
Show Gist options
  • Save serefyarar/7da1baa60eb94e67f689917bfa931f0a to your computer and use it in GitHub Desktop.
Save serefyarar/7da1baa60eb94e67f689917bfa931f0a to your computer and use it in GitHub Desktop.
wildcard mget lua
local cKeys = redis.call("KEYS","your_key:*");
local cValues = redis.call("MGET",unpack(keys))
local cSet = {};
for key,value in pairs(cKeys) do
cSet[value] = cValues[key]
end
return cSet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment