t-cat-spring-boot-starter.1.0.3-sb3.source-code.limit_update.lua Maven / Gradle / Ivy
local key = KEYS[1]
local exprie = ARGV[1]
-- 更新流控计数
local currentValue = tonumber(redis.pcall("INCRBY", key, 1))
if currentValue == 1 then
redis.pcall("EXPIRE", key, exprie)
end
return currentValue
© 2015 - 2025 Weber Informatics LLC | Privacy Policy