From 1928f8d2a8d326509792b08aa31d92ac73649ff9 Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Tue, 28 Jun 2016 17:12:32 +0200 Subject: [PATCH] Caching configured using file_store --- config/environments/development.rb | 6 +++++- config/environments/production.rb | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/config/environments/development.rb b/config/environments/development.rb index 6e3a125..b750e0b 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -9,9 +9,13 @@ Debshots::Application.configure do # Do not eager load code on boot. config.eager_load = false - # Show full error reports and disable caching. + # Show full error reports config.consider_all_requests_local = true + + # Disable caching (except for working on caching) config.action_controller.perform_caching = false + # config.action_controller.perform_caching = true + # config.cache_store = :file_store, "#{Rails.root.to_s}/tmp/cache/filestore" # Don't care if the mailer can't send. config.action_mailer.raise_delivery_errors = false diff --git a/config/environments/production.rb b/config/environments/production.rb index a6df31c..65d43d9 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -13,9 +13,12 @@ Debshots::Application.configure do # ActiveRecord errors propagate normally (forward deprecation to Rails 5) config.active_record.raise_in_transactional_callbacks = true - # Full error reports are disabled and caching is turned on. + # Full error reports are disabled config.consider_all_requests_local = false + + # Caching turned on config.action_controller.perform_caching = true + config.cache_store = :file_store, "#{Rails.root.to_s}/tmp/cache/filestore" # Enable Rack::Cache to put a simple HTTP cache in front of your application # Add `rack-cache` to your Gemfile before enabling this.