mirror of
https://github.com/samsonjs/rack-attack.git
synced 2026-04-10 12:05:51 +00:00
Handle older Dalli clients
This commit is contained in:
parent
128c5aa9bf
commit
92be2791ab
1 changed files with 4 additions and 2 deletions
|
|
@ -14,9 +14,11 @@ module Rack
|
|||
|
||||
if defined?(::Redis::Store) && store.is_a?(::Redis::Store)
|
||||
RedisStoreProxy.new(store)
|
||||
elsif store.respond_to?(:with)
|
||||
elsif defined?(::Dalli) && store.is_a?(::Dalli::Client)
|
||||
DalliProxy.new(store)
|
||||
elsif defined?(::ConnectionPool) && store.is_a?(::ConnectionPool)
|
||||
store.with do |conn|
|
||||
if defined?(::Dalli) && conn.is_a?(::Dalli::Client)
|
||||
if conn.is_a?(::Dalli::Client)
|
||||
DalliProxy.new(store)
|
||||
else
|
||||
raise NotImplementedError
|
||||
|
|
|
|||
Loading…
Reference in a new issue