mirror of
https://github.com/samsonjs/rack-attack.git
synced 2026-03-26 09:35:49 +00:00
commit
7002a2a5cd
2 changed files with 2 additions and 2 deletions
|
|
@ -156,7 +156,7 @@ You can subscribe to 'rack.attack' events and log it, graph it, etc:
|
|||
|
||||
## Performance
|
||||
|
||||
The overhead of running Rack::Attack is typically neglible (a few milliseconds per request),
|
||||
The overhead of running Rack::Attack is typically negligible (a few milliseconds per request),
|
||||
but it depends on how many checks you've configured, and how long they take.
|
||||
Throttles usually require a network roundtrip to your cache server(s),
|
||||
so try to keep the number of throttle checks per request low.
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ module Rack
|
|||
attr_reader :store
|
||||
def store=(store)
|
||||
# RedisStore#increment needs different behavior, so detect that
|
||||
# (method has an arity of 2; must call #expire seperately
|
||||
# (method has an arity of 2; must call #expire separately
|
||||
if defined?(::ActiveSupport::Cache::RedisStore) && store.is_a?(::ActiveSupport::Cache::RedisStore)
|
||||
# ActiveSupport::Cache::RedisStore doesn't expose any way to set an expiry,
|
||||
# so use the raw Redis::Store instead
|
||||
|
|
|
|||
Loading…
Reference in a new issue