Merge pull request #30244 from yhirano55/refactor_max_age_seconds
Refactor max-age seconds
This commit is contained in:
commit
a684d7b4a0
@ -19,7 +19,7 @@ Rails.application.configure do
|
||||
|
||||
config.cache_store = :memory_store
|
||||
config.public_file_server.headers = {
|
||||
'Cache-Control' => "public, max-age=#{2.days.seconds.to_i}"
|
||||
'Cache-Control' => "public, max-age=#{2.days.to_i}"
|
||||
}
|
||||
else
|
||||
config.action_controller.perform_caching = false
|
||||
|
@ -15,7 +15,7 @@ Rails.application.configure do
|
||||
# Configure public file server for tests with Cache-Control for performance.
|
||||
config.public_file_server.enabled = true
|
||||
config.public_file_server.headers = {
|
||||
'Cache-Control' => "public, max-age=#{1.hour.seconds.to_i}"
|
||||
'Cache-Control' => "public, max-age=#{1.hour.to_i}"
|
||||
}
|
||||
|
||||
# Show full error reports and disable caching.
|
||||
|
Loading…
Reference in New Issue
Block a user