Skip to content

Commit 9d6e621

Browse files
heiskrCopilot
andauthored
Disable Next.js in-memory cache (#60229)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 97100fb commit 9d6e621

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

next.config.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,13 @@ const config: NextConfig = {
8383
// the CDN marks the cached content as "fresh".
8484
generateEtags: false,
8585

86+
// Disable Next.js's in-memory data cache. We don't use ISR or cached
87+
// fetch — all pages render via Express middleware with getServerSideProps.
88+
// The default 50 MB cache is unnecessary overhead during a memory-leak
89+
// investigation and is implicated in known Next.js 16.1.x memory issues
90+
// (vercel/next.js#88603).
91+
cacheMaxMemorySize: 0,
92+
8693
compiler: {
8794
styledComponents: true,
8895
},

0 commit comments

Comments
 (0)