Flowdock
new(app, options = {}) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# 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
Register or log in to add new notes.