7: def initialize(app, options = {})
8:
9: options[:expire_after] ||= options[:expires]
10:
11: super
12:
13: @default_options = {
14: :namespace => 'rack:session',
15: :memcache_server => 'localhost:11211'
16: }.merge(@default_options)
17:
18: @pool = options[:cache] || MemCache.new(@default_options[:memcache_server], @default_options)
19: unless @pool.servers.any? { |s| s.alive? }
20: raise "#{self} unable to find server during initialization."
21: end
22: @mutex = Mutex.new
23:
24: super
25: end