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}`;