feat: update CacheKey to use NEXT_PUBLIC_BUILD_ID for consistent caching

This commit is contained in:
Marco Pedone 2025-10-16 11:58:15 +02:00
parent c84e315eee
commit 7db56a50ec
2 changed files with 5 additions and 1 deletions

View file

@ -14,6 +14,10 @@ const nextConfig = {
// esmExternals: "loose", // This if react-pdf gives compilation issues // esmExternals: "loose", // This if react-pdf gives compilation issues
}, },
env: {
NEXT_PUBLIC_BUILD_ID: Math.random().toString(36).slice(2, 8),
},
devIndicators: false, devIndicators: false,
headers: async () => { headers: async () => {
return [ return [

View file

@ -1 +1 @@
export const CacheKey = `cachekey=${Math.random().toString(36).slice(2, 8)}`; export const CacheKey = `cachekey=${process.env.NEXT_PUBLIC_BUILD_ID}`;