You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
557 B

local cursor ='GET', KEYS[3]) or 0
local scan_result ='HSCAN', KEYS[1], cursor, 'COUNT', ARGV[1])
local newcursor = scan_result[1]
local cursor ='SET', KEYS[3], newcursor)'EXPIRE', KEYS[3], 30)
for key,value in ipairs(scan_result[2]) do
local uskey, sidkey = string.match(value, '(.*)||(.*)')
if uskey and sidkey then'HDEL', uskey, sidkey)'HDEL', KEYS[1], value)
else'HDEL', KEYS[2], value)
return newcursor