From 7db56a50ec19d87ecb1f0fe0949870b467f41977 Mon Sep 17 00:00:00 2001 From: Marco Pedone Date: Thu, 16 Oct 2025 11:58:15 +0200 Subject: [PATCH] feat: update CacheKey to use NEXT_PUBLIC_BUILD_ID for consistent caching --- apps/infoalloggi/next.config.mjs | 4 ++++ apps/infoalloggi/src/utils/imageCache.ts | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/infoalloggi/next.config.mjs b/apps/infoalloggi/next.config.mjs index 3e1774b..00e655e 100644 --- a/apps/infoalloggi/next.config.mjs +++ b/apps/infoalloggi/next.config.mjs @@ -14,6 +14,10 @@ const nextConfig = { // esmExternals: "loose", // This if react-pdf gives compilation issues }, + env: { + NEXT_PUBLIC_BUILD_ID: Math.random().toString(36).slice(2, 8), + }, + devIndicators: false, headers: async () => { return [ diff --git a/apps/infoalloggi/src/utils/imageCache.ts b/apps/infoalloggi/src/utils/imageCache.ts index 6593850..7ea96c4 100644 --- a/apps/infoalloggi/src/utils/imageCache.ts +++ b/apps/infoalloggi/src/utils/imageCache.ts @@ -1 +1 @@ -export const CacheKey = `cachekey=${Math.random().toString(36).slice(2, 8)}`; +export const CacheKey = `cachekey=${process.env.NEXT_PUBLIC_BUILD_ID}`;