Class: ActionController::Session::MemcachedSessionStore

Inherits:
AbstractStore
  • Object
show all
Defined in:
lib/memcached_session_store.rb

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of MemcachedSessionStore.



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/memcached_session_store.rb', line 6

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

  @pool =  options[:cache] || Memcached::Rails.new()
  
  begin
    @pool.stats
  rescue Memcached::SomeErrorsWereReported
    raise "#{self} unable to find server during initialization."
  end
  
  @mutex = Mutex.new

  super
end