NeoZephyr / Post-It-Note

0 stars 0 forks source link

java redis jedis #24

Open NeoZephyr opened 2 years ago

NeoZephyr commented 2 years ago

正确的解锁

if redis.call("get",KEYS[1]) == ARGV[1] then
    return redis.call("del",KEYS[1])
else
    return 0
end

正确的续租

if redis.call("get",KEYS[1]) == ARGV[1] then
    return redis.call("expire",KEYS[1], ARGV[2])
else
    return 0
end