Class: Beats::Rack::Cache
- Inherits:
-
Rack::Cache::Context
- Object
- Rack::Cache::Context
- Beats::Rack::Cache
- Defined in:
- lib/beats/rack/cache.rb
Instance Method Summary collapse
-
#initialize(app, options = {}, &b) ⇒ Cache
constructor
A new instance of Cache.
Constructor Details
#initialize(app, options = {}, &b) ⇒ Cache
Returns a new instance of Cache.
32 33 34 35 36 37 38 |
# File 'lib/beats/rack/cache.rb', line 32 def initialize(app, ={}, &b) = { :metastore => ENV['MEMCACHE_SERVERS'] ? Dalli::Client.new(:namespace => 'rack-cache:meta', :compress => true, :async => true) : 'heap:/', :entitystore => ENV['MEMCACHE_SERVERS'] ? Dalli::Client.new(:namespace => 'rack-cache:body', :compress => true, :async => true) : 'heap:/' }.merge() super(app, , &b) end |