diff --git a/config/environments/development.rb b/config/environments/development.rb index 524b5ed2d..158a78342 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -20,15 +20,14 @@ if Rails.root.join("tmp/caching-dev.txt").exist? config.action_controller.perform_caching = true config.action_controller.enable_fragment_cache_logging = true - - config.cache_store = :memory_store 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 + # Change to :null_store to avoid any caching. + config.cache_store = :memory_store + # Don't care if the mailer can't send. config.action_mailer.raise_delivery_errors = false @@ -63,7 +62,7 @@ config.active_record.verbose_query_logs = true # Append comments with runtime information tags to SQL queries in logs. - # config.active_record.query_log_tags_enabled = true + config.active_record.query_log_tags_enabled = true # Highlight code that enqueued background job in logs. config.active_job.verbose_enqueue_logs = true diff --git a/config/environments/production.rb b/config/environments/production.rb index 4bd370f98..373e12230 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -15,8 +15,8 @@ # Turn on fragment caching in view templates. config.action_controller.perform_caching = true - # Disable serving static files from `public/`, relying on NGINX/Apache to do so instead. - config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present? + # Disable serving static files from `public/`. + config.public_file_server.enabled = false # Cache assets for far-future expiry since they are all digest stamped. # config.public_file_server.headers = { "cache-control" => "public, max-age=#{1.year.to_i}" }