Class: ActionController::Session::RedisSessionStore
- Inherits:
-
AbstractStore
- Object
- AbstractStore
- ActionController::Session::RedisSessionStore
- Defined in:
- lib/rack/session/rails.rb
Overview
:expire_after => A number in seconds to set the timeout interval for the session. Will map directly to expiry in Redis
Instance Method Summary collapse
-
#initialize(app, options = {}) ⇒ RedisSessionStore
constructor
A new instance of RedisSessionStore.
Constructor Details
#initialize(app, options = {}) ⇒ RedisSessionStore
Returns a new instance of RedisSessionStore.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/rack/session/rails.rb', line 17 def initialize(app, = {}) # Support old :expires option [:expire_after] ||= [:expires] super @options = { :key_prefix => "" }.update() servers = [[:servers]].flatten.compact.map do || { :namespace => 'rack:session', :host => 'localhost', :port => '6379', :db => 0 }.update(RedisFactory.()) end @pool = RedisFactory.create(*servers) end |