class method
self.new
Ruby on Rails 2.3.18
Since v2.3.18 Last seen in v2.3.18Signature
self.new(app, options = {})
No documentation comment.
Parameters
-
appreq -
optionsopt = {}
Source
# File actionpack/lib/action_controller/session/mem_cache_store.rb, line 7
def initialize(app, options = {})
# 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
Defined in actionpack/lib/action_controller/session/mem_cache_store.rb line 7
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionController::Session::MemCacheStore