From ba05cdfe61159adaf216d13b85a53213d456c257 Mon Sep 17 00:00:00 2001 From: Evandro Fonseca Junior Date: Thu, 8 Oct 2026 16:37:01 -0300 Subject: [PATCH] perf(videos): cache de um dia, com revalidacao em segundo plano, para /videos Co-Authored-By: Claude Sonnet 5.5 --- next.config.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/next.config.ts b/next.config.ts index 47d962f..2a8fbc2 100644 --- a/next.config.ts +++ b/next.config.ts @@ -79,6 +79,16 @@ const nextConfig: NextConfig = { source: "/(.*)", headers: securityHeaders, }, + { + // vídeos da vitrine (46 MB): sem o hash no nome, um dia de cache e revalidação em segundo plano na semana seguinte + source: "/videos/:path*", + headers: [ + { + key: "Cache-Control", + value: "public, max-age=86400, stale-while-revalidate=604800", + }, + ], + }, ]; },