aboutsummaryrefslogtreecommitdiffstats
path: root/lualib/redis_scripts/ratelimit_check.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lualib/redis_scripts/ratelimit_check.lua')
-rw-r--r--lualib/redis_scripts/ratelimit_check.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/lualib/redis_scripts/ratelimit_check.lua b/lualib/redis_scripts/ratelimit_check.lua
index f066610a5..f8e34bbf7 100644
--- a/lualib/redis_scripts/ratelimit_check.lua
+++ b/lualib/redis_scripts/ratelimit_check.lua
@@ -86,7 +86,7 @@ if burst + pending > 0 then
burst = burst + pending
if burst > 0 and burst > max_burst * dynb then
redis.call('ZREMRANGEBYRANK', cache_prefix, 0, -(max_cache_size + 1))
- redis.call('ZINCRBY', cache_prefix, 1, prefix)
+ redis.call('ZADD', cache_prefix, now, prefix) -- LRU cache is based on timestamps of buckets
return { 1, tostring(burst - pending), tostring(dynr), tostring(dynb), tostring(leaked) }
end