A change in the default configuration of development environments
in rails 5.1 means that caching is now disabled by default so in
that case fall back to using cookies instead.
Closes #1666
if defined?(MEMCACHE_SERVERS)
Rails.application.config.session_store :mem_cache_store, :memcache_server => MEMCACHE_SERVERS, :namespace => "rails:session", :key => "_osm_session"
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"
Rails.application.config.session_store :cache_store, :key => "_osm_session"
+else
+ Rails.application.config.session_store :cookie_store, :key => "_osm_session"