I have a very weird problem, when storing my session in Memcached. From time to time some users takes the session of others. E.g. John, becomes logged in as Maria, Maria as
I never ran into such a problem before, I just can't imagine that it's even happening. This is my conf:
require 'memcache'
memcache_options = {
:c_threshold => 10_000,
:compression => true,
:debug => false,
:namespace => "app-me",
:readonly => false,
:urlencode => false
}
memcache_servers = [ "#{MEMCACHED_HOST}:#{MEMCACHED_PORT}" ]
CACHE = MemCache.new memcache_options
CACHE.servers = memcache_servers
ActionController::Base.session_options[:expires] = 1800
ActionController::Base.session_options[:cache] = CACHE
# Inside the Rails initializer
config.action_controller.session_store = :mem_cache_store