Class: ActionDispatch::Session::RedisStore

Inherits:
Rack::Session::Redis
  • Object
show all
Includes:
Compatibility, SessionObject, StaleSessionCheck
Defined in:
lib/action_dispatch/middleware/session/redis_store.rb

Overview

Session storage in Redis, using Redis::Rack as a basis.

Instance Method Summary collapse

Constructor Details

#initialize(app, options = {}) ⇒ RedisStore

Returns a new instance of RedisStore.



15
16
17
18
19
# File 'lib/action_dispatch/middleware/session/redis_store.rb', line 15

def initialize(app, options = {})
  options = options.dup
  options[:redis_server] ||= options[:servers]
  super
end

Instance Method Details

#generate_sidObject



21
22
23
# File 'lib/action_dispatch/middleware/session/redis_store.rb', line 21

def generate_sid
  Rack::Session::SessionId.new(super)
end