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.
|
|
|
local key = KEYS[1]
|
|
|
|
local value = ARGV[1]
|
|
|
|
local expireTime = ARGV[2]
|
|
|
|
|
|
|
|
local exists = redis.call("EXISTS", key)
|
|
|
|
|
|
|
|
if exists == 1 then
|
|
|
|
return 1
|
|
|
|
end
|
|
|
|
|
|
|
|
redis.call("SETEX", key, expireTime, value)
|
|
|
|
return 0
|