mirror of
https://github.com/samsonjs/rack-attack.git
synced 2026-03-25 09:25:49 +00:00
Default increment amount to 1 as RedisCacheStore
This commit is contained in:
parent
ca2e752937
commit
2c1cbc323e
1 changed files with 1 additions and 1 deletions
|
|
@ -8,7 +8,7 @@ module Rack
|
|||
defined?(::ActiveSupport::Cache::RedisCacheStore) && store.is_a?(::ActiveSupport::Cache::RedisCacheStore)
|
||||
end
|
||||
|
||||
def increment(name, amount, options = {})
|
||||
def increment(name, amount = 1, options = {})
|
||||
# RedisCacheStore#increment ignores options[:expires_in].
|
||||
#
|
||||
# So in order to workaround this we use RedisCacheStore#write (which sets expiration) to initialize
|
||||
|
|
|
|||
Loading…
Reference in a new issue