Use a memory cache for sessions when memcache is not configured

Fixes #1695
This commit is contained in:
Tom Hughes 2017-12-04 21:19:38 +00:00
parent 5a274a06f2
commit fd33ff83f3

View file

@ -2,8 +2,6 @@
if defined?(MEMCACHE_SERVERS)
Rails.application.config.session_store :mem_cache_store, :memcache_server => MEMCACHE_SERVERS, :namespace => "rails:session", :key => "_osm_session"
elsif Rails.application.config.cache_store != :null_store
Rails.application.config.session_store :cache_store, :key => "_osm_session"
else
Rails.application.config.session_store :cookie_store, :key => "_osm_session"
Rails.application.config.session_store :cache_store, :key => "_osm_session", :cache => ActiveSupport::Cache::MemoryStore.new
end