5 changed files with 8 additions and 22 deletions
@ -1,6 +1,6 @@ |
|||
if (redis.call('EXISTS',KEYS[1]) ~= 0) then |
|||
redis.call('INCRBY',KEYS[1], 1) |
|||
else |
|||
redis.call('SETEX',KEYS[1],ARGV[1],1) |
|||
redis.call('SET',KEYS[1],1, 'EX', ARGV[1]) |
|||
end |
|||
return tonumber(redis.call('GET',KEYS[1])) |
|||
Loading…
Reference in new issue