Last active
December 4, 2019 14:12
-
-
Save rockstar2046/1f7eddab299c7a0e11b91d58ba274efa to your computer and use it in GitHub Desktop.
msismember.lua
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 key = KEYS[1] | |
if redis.call('EXISTS', key) == 1 then | |
local r = 0 | |
for i, v in ipairs(ARGV) do | |
if redis.call('SISMEMBER', key, v) == 1 then | |
r=r+1 | |
end | |
end | |
return r | |
else | |
return 0 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment