Created
July 10, 2016 18:58
-
-
Save serefyarar/7da1baa60eb94e67f689917bfa931f0a to your computer and use it in GitHub Desktop.
wildcard mget lua
This file contains hidden or 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 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