From 45521148acca7730ab8a3a4fbbc97bd4d437d4d6 Mon Sep 17 00:00:00 2001 From: Jon Kafton <939376+jonkafton@users.noreply.github.com> Date: Thu, 17 Oct 2024 18:47:24 +0200 Subject: [PATCH 1/2] Increase cache durations --- frontends/main/next.config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontends/main/next.config.js b/frontends/main/next.config.js index a5aa839023..47ff3d4eaf 100644 --- a/frontends/main/next.config.js +++ b/frontends/main/next.config.js @@ -45,7 +45,7 @@ const nextConfig = { headers: [ { key: "Cache-Control", - value: "s-maxage=120", + value: "s-maxage=1800", }, ], }, @@ -58,7 +58,7 @@ const nextConfig = { headers: [ { key: "Cache-Control", - value: "s-maxage=600", + value: "s-maxage=31536000", }, ], }, From 96b1adc810f54d3436a04f7316f796a8a062b903 Mon Sep 17 00:00:00 2001 From: Jon Kafton <939376+jonkafton@users.noreply.github.com> Date: Thu, 17 Oct 2024 18:55:54 +0200 Subject: [PATCH 2/2] Update comment --- frontends/main/next.config.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/frontends/main/next.config.js b/frontends/main/next.config.js index 47ff3d4eaf..62a8549aa3 100644 --- a/frontends/main/next.config.js +++ b/frontends/main/next.config.js @@ -36,9 +36,12 @@ const nextConfig = { async headers() { return [ - /* This is intended to target the base HTML responses. Some are dynamically rendered, - * so Next.js instructs no-cache, however we are currently serving public content that - * is cacheable. Excludes everything with a file extension so we're matching only on routes. + /* This is intended to target the base HTML responses and streamed RSC + * content. Some routes are dynamically rendered, so NextJS by default + * sets no-cache. However we are currently serving public content that is + * cacheable. + * + * Excludes everything with a file extension so we're matching only on routes. */ { source: "/((?!.*\\.[a-zA-Z0-9]{2,4}$).*)",