mirror of
https://github.com/samsonjs/rack-attack.git
synced 2026-04-27 15:07:41 +00:00
Acceptance tests already cover integration with RedisCacheStore and MemCacheStore
This commit is contained in:
parent
5aedc05121
commit
3f590e4774
1 changed files with 0 additions and 5 deletions
|
|
@ -16,23 +16,18 @@ describe Rack::Attack::Cache do
|
||||||
end
|
end
|
||||||
|
|
||||||
require 'active_support/cache/dalli_store'
|
require 'active_support/cache/dalli_store'
|
||||||
require 'active_support/cache/mem_cache_store'
|
|
||||||
require 'active_support/cache/redis_store'
|
require 'active_support/cache/redis_store'
|
||||||
require 'active_support/cache/redis_cache_store' if ActiveSupport.version.to_s.to_f >= 5.2
|
|
||||||
require 'connection_pool'
|
require 'connection_pool'
|
||||||
|
|
||||||
cache_stores = [
|
cache_stores = [
|
||||||
ActiveSupport::Cache::MemoryStore.new,
|
ActiveSupport::Cache::MemoryStore.new,
|
||||||
ActiveSupport::Cache::DalliStore.new("127.0.0.1"),
|
ActiveSupport::Cache::DalliStore.new("127.0.0.1"),
|
||||||
ActiveSupport::Cache::RedisStore.new("127.0.0.1"),
|
ActiveSupport::Cache::RedisStore.new("127.0.0.1"),
|
||||||
ActiveSupport::Cache::MemCacheStore.new("127.0.0.1"),
|
|
||||||
Dalli::Client.new,
|
Dalli::Client.new,
|
||||||
ConnectionPool.new { Dalli::Client.new },
|
ConnectionPool.new { Dalli::Client.new },
|
||||||
Redis::Store.new
|
Redis::Store.new
|
||||||
]
|
]
|
||||||
|
|
||||||
cache_stores << ActiveSupport::Cache::RedisCacheStore.new if defined?(ActiveSupport::Cache::RedisCacheStore)
|
|
||||||
|
|
||||||
cache_stores.each do |store|
|
cache_stores.each do |store|
|
||||||
store = Rack::Attack::StoreProxy.build(store)
|
store = Rack::Attack::StoreProxy.build(store)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue