diff --git a/config/environments/development.rb b/config/environments/development.rb index d11f0cdfc..26ff83cb1 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -14,22 +14,20 @@ Rails.application.configure do # Show full error reports. config.consider_all_requests_local = true + DEFAULT_EXPIRATION = 1.hour.to_i.freeze + config.cache_store = :redis_cache_store, { url: ENV["REDIS_URL"], expires_in: DEFAULT_EXPIRATION } + # Enable/disable caching. By default caching is disabled. # Run rails dev:cache to toggle caching. if Rails.root.join("tmp/caching-dev.txt").exist? config.action_controller.perform_caching = true config.action_controller.enable_fragment_cache_logging = true - DEFAULT_EXPIRATION = 1.hour.to_i.freeze - config.cache_store = :redis_cache_store, { url: ENV["REDIS_URL"], expires_in: DEFAULT_EXPIRATION } - config.public_file_server.headers = { "Cache-Control" => "public, max-age=#{2.days.to_i}" } else config.action_controller.perform_caching = false - - config.cache_store = :null_store end # Don't care if the mailer can't send.