mirror of
https://github.com/samsonjs/rack-attack.git
synced 2026-04-27 15:07:41 +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
|
module StoreProxy
|
||||||
class RedisCacheStoreProxy < SimpleDelegator
|
class RedisCacheStoreProxy < SimpleDelegator
|
||||||
def self.handle?(store)
|
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
|
end
|
||||||
|
|
||||||
def increment(name, amount = 1, options = {})
|
def increment(name, amount = 1, options = {})
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue