Created
February 4, 2013 17:45
-
-
Save tal/4708255 to your computer and use it in GitHub Desktop.
Returns a hash of arrays with the key being everything that `*` matches and the value being the contents of the list
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 keys = redis.call('keys',KEY[1]) | |
| local ret = {} | |
| for i,key in ipairs(keys) do | |
| local keyname = key:sub(1,-2) | |
| local members = redis.call('lrange', key,0 ,-1) | |
| ret[i] = {keyname, members} | |
| end | |
| ret |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment