Skip to content

Commit

Permalink
feat: add dynamic expire
Browse files Browse the repository at this point in the history
  • Loading branch information
gurgunday committed Feb 10, 2025
1 parent 8aa8b5d commit fd0bda7
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ export class ThrottlerStorageRedisService implements ThrottlerStorageRedis, OnMo
timeToExpire = ttl
end
if blockDuration < 0 then
blockDuration = timeToExpire
end
local isBlocked = redis.call('GET', blockKey)
local timeToBlockExpire = 0
Expand Down

0 comments on commit fd0bda7

Please sign in to comment.