aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/middleware/session/mem_cache_store.rb
blob: 38a737cd2ba2b96ee192eddb2caa8f75d1a6bdb9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
require 'action_dispatch/middleware/session/abstract_store'
require 'rack/session/memcache'

module ActionDispatch
  module Session
    class MemCacheStore < Rack::Session::Memcache
      include Compatibility
      include StaleSessionCheck
      include SessionObject

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