Created
June 24, 2016 19:04
-
-
Save serefyarar/82cdc80cb1649f321cba1b4499a1c348 to your computer and use it in GitHub Desktop.
redis wildcard mget
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
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