From 108337e82344fe7e5292bcac3055b76c12eb62c2 Mon Sep 17 00:00:00 2001 From: Kevin McConnell Date: Wed, 28 Jan 2026 14:26:03 +0000 Subject: [PATCH] Cache public pages for 5 mins, not 1 year Given these may be cached in CDNs, and they aren't versioned, a shorter expiration time makes it practical to change them. --- config/environments/production.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/environments/production.rb b/config/environments/production.rb index 03a9df6771..d2db6a0078 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -51,7 +51,7 @@ config.public_file_server.enabled = true config.public_file_server.headers = { - "Cache-Control" => "public, max-age=#{1.year.to_i}" + "Cache-Control" => "public, max-age=#{5.minutes.to_i}" } # Select Active Storage service via env var; default to local disk.