From 7edb45b0d7b3ff021821c242fd9af721c80739da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 24 Aug 2015 18:51:28 +0200 Subject: [PATCH] configures the null cache store in all environments This commit allows us to use caching and Rails.cache. Temporarily we configure the null store in all environments, but those will probably be memcached in the future. References #235 --- config/environments/development.rb | 2 ++ config/environments/production.rb | 2 +- config/environments/staging.rb | 2 +- config/environments/test.rb | 2 ++ spec/features/comments_spec.rb | 2 +- 5 files changed, 7 insertions(+), 3 deletions(-) diff --git a/config/environments/development.rb b/config/environments/development.rb index 63168eb28..acf67286d 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -42,4 +42,6 @@ Rails.application.configure do # Raises error for missing translations # config.action_view.raise_on_missing_translations = true + + config.cache_store = :null_store end diff --git a/config/environments/production.rb b/config/environments/production.rb index 76ec52249..e84606f73 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -55,7 +55,7 @@ Rails.application.configure do # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) # Use a different cache store in production. - # config.cache_store = :mem_cache_store + config.cache_store = :null_store # Enable serving of images, stylesheets, and JavaScripts from an asset server. # config.action_controller.asset_host = 'http://assets.example.com' diff --git a/config/environments/staging.rb b/config/environments/staging.rb index 76ec52249..e84606f73 100644 --- a/config/environments/staging.rb +++ b/config/environments/staging.rb @@ -55,7 +55,7 @@ Rails.application.configure do # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) # Use a different cache store in production. - # config.cache_store = :mem_cache_store + config.cache_store = :null_store # Enable serving of images, stylesheets, and JavaScripts from an asset server. # config.action_controller.asset_host = 'http://assets.example.com' diff --git a/config/environments/test.rb b/config/environments/test.rb index 34034499f..a76376fe6 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -43,4 +43,6 @@ Rails.application.configure do # Raises error for missing translations # config.action_view.raise_on_missing_translations = true + + config.cache_store = :null_store end diff --git a/spec/features/comments_spec.rb b/spec/features/comments_spec.rb index 10a919a07..ce5403a56 100644 --- a/spec/features/comments_spec.rb +++ b/spec/features/comments_spec.rb @@ -168,4 +168,4 @@ feature 'Comments' do expect(InappropiateFlag.flagged?(user, comment)).to_not be end -end +end \ No newline at end of file