Class: ActionController::Session::RedisSessionStore

Inherits:
AbstractStore
  • Object
show all
Defined in:
lib/redis_store/session/redis_session_store.rb

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of RedisSessionStore.



6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/redis_store/session/redis_session_store.rb', line 6

def initialize(app, options = {})
  options[:expire_after] ||= options[:expires]

  super

  @options = {
    :namespace => 'rack:session',
    :key_prefix => ''
  }.update(options)

  @data = options[:cache] || ::RedisStore::MarshalledClient.new(::RedisStore::Config.new(options))
end