mirror of
https://github.com/samsonjs/rack-attack.git
synced 2026-04-27 15:07:41 +00:00
Fix typos
This commit is contained in:
parent
4df55677d0
commit
d3a9667474
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
|
## 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.
|
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),
|
Throttles usually require a network roundtrip to your cache server(s),
|
||||||
so try to keep the number of throttle checks per request low.
|
so try to keep the number of throttle checks per request low.
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ module Rack
|
||||||
attr_reader :store
|
attr_reader :store
|
||||||
def store=(store)
|
def store=(store)
|
||||||
# RedisStore#increment needs different behavior, so detect that
|
# 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)
|
if defined?(::ActiveSupport::Cache::RedisStore) && store.is_a?(::ActiveSupport::Cache::RedisStore)
|
||||||
# ActiveSupport::Cache::RedisStore doesn't expose any way to set an expiry,
|
# ActiveSupport::Cache::RedisStore doesn't expose any way to set an expiry,
|
||||||
# so use the raw Redis::Store instead
|
# so use the raw Redis::Store instead
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue