From d1e9709a5db97a2da2d6dd0d72aab34cc0279cf8 Mon Sep 17 00:00:00 2001 From: Andrew Hobden Date: Fri, 13 Jan 2017 09:49:48 +0100 Subject: [PATCH] Use memcached on new infra --- config/environments/production.rb | 14 ++++++++------ config/environments/staging.rb | 13 +++++++------ 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/config/environments/production.rb b/config/environments/production.rb index 504f4a8dd..c36bd8e5a 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -47,12 +47,14 @@ # Use a different cache store in production # default is: # config.cache_store = :file_store, "tmp/cache/" - config.cache_store = :mem_cache_store, 'localhost', { namespace: "wheelmap/#{Rails.env}/", - c_threshold: 10_000, - compression: true, - debug: Rails.env.development?, - readonly: false, - urlencode: false } + config.cache_store = :mem_cache_store, 'app-database', { :namespace => "wheelmap/#{Rails.env}/", + :c_threshold => 10_000, + :compression => true, + :debug => Rails.env.development?, + :readonly => false, + :urlencode => false + } + # Disable Rails's static asset server # In production, Apache or nginx will already do this diff --git a/config/environments/staging.rb b/config/environments/staging.rb index ef6f90786..1673fe30c 100644 --- a/config/environments/staging.rb +++ b/config/environments/staging.rb @@ -44,12 +44,13 @@ # Use a different cache store in staging # default is: # config.cache_store = :file_store, "tmp/cache/" - config.cache_store = :mem_cache_store, 'localhost', { namespace: "wheelmap/#{Rails.env}/", - c_threshold: 10_000, - compression: true, - debug: Rails.env.staging?, - readonly: false, - urlencode: false } + config.cache_store = :mem_cache_store, 'app-database', { :namespace => "wheelmap/#{Rails.env}/", + :c_threshold => 10_000, + :compression => true, + :debug => Rails.env.staging?, + :readonly => false, + :urlencode => false + } # Disable Rails's static asset server # In production, Apache or nginx will already do this