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 |
# 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' }.merge(@default_options) @pool = [:cache] || begin Dalli::Client.new( @default_options[:memcache_server], @default_options) end @namespace = @default_options[:namespace] @raise_errors = !!@default_options[:raise_errors] super end |
Instance Method Details
#reset ⇒ Object
28 29 30 |
# File 'lib/action_dispatch/middleware/session/dalli_store.rb', line 28 def reset @pool.reset end |