Skip to content

Instantly share code, notes, and snippets.

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