method
new
v3.0.9 -
Show latest stable
- Class:
ActionDispatch::Session::MemCacheStore
new(app, options = {})public
No documentation available.
# File actionpack/lib/action_dispatch/middleware/session/mem_cache_store.rb, line 4
def initialize(app, options = {})
require 'memcache'
# Support old :expires option
options[:expire_after] ||= options[:expires]
super
@default_options = {
:namespace => 'rack:session',
:memcache_server => 'localhost:11211'
}.merge(@default_options)
@pool = options[:cache] || MemCache.new(@default_options[:memcache_server], @default_options)
unless @pool.servers.any? { |s| s.alive? }
raise "#{self} unable to find server during initialization."
end
@mutex = Mutex.new
super
end