]> git.openstreetmap.org Git - rails.git/blobdiff - config/initializers/session_store.rb
Only send user IDs to matomo when configured to do so
[rails.git] / config / initializers / session_store.rb
index 17173d536612fdbba32887b1d766a651e3ffee45..a122848553bf1a9f00fe4d09f2f18ee292617f3b 100644 (file)
@@ -1,7 +1,7 @@
 # Be sure to restart your server when you modify this file.
 
-if defined?(MEMCACHE_SERVERS)
-  OpenStreetMap::Application.config.session_store :mem_cache_store, :memcache_server => MEMCACHE_SERVERS, :namespace => "rails:session", :key => "_osm_session"
+if Settings.key?(:memcache_servers)
+  Rails.application.config.session_store :mem_cache_store, :memcache_server => Settings.memcache_servers, :namespace => "rails:session", :key => "_osm_session"
 else
-  OpenStreetMap::Application.config.session_store :cache_store, :key => '_osm_session'
+  Rails.application.config.session_store :cache_store, :key => "_osm_session", :cache => ActiveSupport::Cache::MemoryStore.new
 end