Class: ActionDispatch::Session::DalliStore
- Inherits:
-
AbstractStore
- Object
- AbstractStore
- ActionDispatch::Session::DalliStore
- Defined in:
- lib/action_dispatch/middleware/session/dalli_store.rb
Instance Method Summary collapse
-
#initialize(app, options = {}) ⇒ DalliStore
constructor
A new instance of DalliStore.
- #reset ⇒ Object
Constructor Details
#initialize(app, options = {}) ⇒ DalliStore
Returns a new instance of DalliStore.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/action_dispatch/middleware/session/dalli_store.rb', line 9 def initialize(app, = {}) # Support old :expires option [:expire_after] ||= [:expires] super @default_options = { :namespace => 'rack:session', :memcache_server => 'localhost:11211', }.merge(@default_options) @pool = [:cache] || begin Dalli::Client.new( @default_options[:memcache_server], @default_options) end @namespace = @default_options[:namespace] super end |
Instance Method Details
#reset ⇒ Object
29 30 31 |
# File 'lib/action_dispatch/middleware/session/dalli_store.rb', line 29 def reset @pool.reset end |