mirror of
https://github.com/samsonjs/rack-attack.git
synced 2026-03-25 09:25:49 +00:00
Fix 'redis is not part of the bundle' exception when using :memory_store
When RedisCacheStore constant is referenced, activesupport autoloads and rails tries to require redis, throwing exception if not present
This commit is contained in:
parent
e3213ee746
commit
ee84079768
1 changed files with 1 additions and 1 deletions
|
|
@ -5,7 +5,7 @@ module Rack
|
|||
module StoreProxy
|
||||
class RedisCacheStoreProxy < SimpleDelegator
|
||||
def self.handle?(store)
|
||||
defined?(::ActiveSupport::Cache::RedisCacheStore) && store.is_a?(::ActiveSupport::Cache::RedisCacheStore)
|
||||
defined?(::Redis) && defined?(::ActiveSupport::Cache::RedisCacheStore) && store.is_a?(::ActiveSupport::Cache::RedisCacheStore)
|
||||
end
|
||||
|
||||
def increment(name, amount = 1, options = {})
|
||||
|
|
|
|||
Loading…
Reference in a new issue