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.
22 lines
356 B
22 lines
356 B
local key1 = KEYS[1]
|
|
local key2 = KEYS[2]
|
|
|
|
|
|
--获取ARGV内的参数并打印
|
|
|
|
local valuemodel = ARGV[1]
|
|
|
|
local times = ARGV[2]
|
|
|
|
local timesNumber = 0;
|
|
|
|
local t = type(times);
|
|
|
|
if t == "string" then
|
|
timesNumber = tonumber(times) + 0
|
|
end
|
|
|
|
--往redis设置值
|
|
redis.call("SETEX",key2,timesNumber,timesNumber)
|
|
redis.call("SETEX",key1,timesNumber,valuemodel)
|