Skip to content

Commit

Permalink
Merge pull request #198 from leonardodeoliveira/patch-1
Browse files Browse the repository at this point in the history
Add TTL for sliding window stats_key
  • Loading branch information
cristipufu authored Nov 18, 2024
2 parents 91fe5d4 + 387bf63 commit a6282f2
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ internal class RedisSlidingWindowManager
redis.call(""hincrby"", @stats_key, 'total_failed', 1)
end
redis.call(""pexpireat"", @stats_key, expireAtMilliseconds)
return { allowed, count }");

private static readonly LuaScript StatisticsScript = LuaScript.Prepare(
Expand Down

0 comments on commit a6282f2

Please sign in to comment.