5.4 enabled caching in dev environment

This commit is contained in:
Aaro Koivukangas
2023-11-16 15:07:51 +02:00
parent 9fa96d8456
commit 726ecd3e2b
3 changed files with 8 additions and 4 deletions
+2 -2
View File
@@ -23,14 +23,14 @@ Rails.application.configure do
config.action_controller.perform_caching = true
config.action_controller.enable_fragment_cache_logging = true
config.cache_store = :memory_store
config.cache_store = :file_store, "tmp/cache_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
config.cache_store = :file_store, "tmp/cache_store"
end
# Store uploaded files on the local file system (see config/storage.yml for options).
+1 -1
View File
@@ -25,7 +25,7 @@ Rails.application.configure do
# Show full error reports and disable caching.
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
config.cache_store = :null_store
config.cache_store = :memory_store
# Raise exceptions instead of rendering exception templates.
config.action_dispatch.show_exceptions = false