From f0369b7556234c0f0dffd1c9ec5e2272ea576cbe Mon Sep 17 00:00:00 2001 From: Lars Trieloff Date: Wed, 24 Apr 2019 12:22:46 +0000 Subject: [PATCH] perf(static): declare static files to be immutable --- layouts/fastly/helix.vcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/fastly/helix.vcl b/layouts/fastly/helix.vcl index 6dc69563..8b60b1c8 100644 --- a/layouts/fastly/helix.vcl +++ b/layouts/fastly/helix.vcl @@ -499,7 +499,7 @@ sub hlx_fetch_static { # check for hard-cached files like /foo.js.hlx_f7c3bc1d808e04732adf679965ccc34ca7ae3441 if (req.http.X-Orig-URL ~ "^(.*)(.hlx_([0-9a-f]){20,40}$)") { # tell the browser to keep them forever - set beresp.http.Cache-Control = "max-age=31622400"; # keep it for a year in the browser; + set beresp.http.Cache-Control = "max-age=31622400,immutable"; # keep it for a year in the browser; set beresp.http.Surrogate-Control = "max-age=3600"; # but only for an hour in the shared cache # to limit cache poisioning set beresp.cacheable = true;