1 # Be sure to restart your server when you modify this file.
3 if defined?(MEMCACHE_SERVERS)
4 unless STATUS == :database_offline or STATUS == :database_readonly
8 def get_session(env, sid)
9 with_lock(env, [nil, {}]) do
10 unless sid and session = @pool.get(sid)
11 if sid and s = ActiveRecord::SessionStore::SqlBypass.find_by_session_id(sid)
15 sid, session = generate_sid, {}
18 unless /^STORED/ =~ @pool.add(sid, session)
19 raise "Session collision on '#{sid.inspect}'"
30 cache = MemCache.new(:namespace => "rails:session", :string_return_types => true)
32 OpenStreetMap::Application.config.session_store :mem_cache_store, :cache => cache, :key => "_osm_session"
34 OpenStreetMap::Application.config.session_store :cookie_store, :key => '_osm_session'