nextjs - 💡(How to fix) Fix Why is the router cache duration for statically rendered pages in Next 14 is 30 seconds, instead of the 5 minutes stated in the documentation? [2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vercel/next.js#88233Fetched 2026-04-08 02:05:20
View on GitHub
Comments
2
Participants
3
Timeline
6
Reactions
0
Author
Timeline (top)
commented ×2closed ×1issue_type_added ×1labeled ×1

Code Example

"next": "14.2.35",
"react": "^18",
"react-dom": "^18",
RAW_BUFFERClick to expand / collapse

Link to the code that reproduces this issue

https://github.com/lizuncong/next14-app

To Reproduce

repo: https://github.com/lizuncong/next14-app demo: https://next14-app-nu.vercel.app/static-render3 Next Version: 14.2.35

Current vs. Expected behavior

As you know, https://next14-app-nu.vercel.app/static-render3 is a statically rendered page.

<img width="1168" height="656" alt="Image" src="https://github.com/user-attachments/assets/40fb903b-605b-4906-bc87-0c1c9adcd0c7" /> I navigate back and forth between two statically rendered pages, **static-render2** and **static-render3**. Within 30 seconds, the Router Cache is active, and the client doesn't send requests to the server. After 30 seconds, the Router Cache expires, and the client sends requests to the server. <img width="2776" height="1498" alt="Image" src="https://github.com/user-attachments/assets/7271717e-2366-4bff-8eb2-4ef0f30f16ed" />

Therefore, it appears that the Router Cache Duration for statically rendered pages is only 30 seconds, instead of the 5 minutes stated in the documentation.

<img width="2864" height="1346" alt="Image" src="https://github.com/user-attachments/assets/d506a286-c55a-4c71-89f1-1b1f86b7ac48" />

Provide environment information

"next": "14.2.35",
"react": "^18",
"react-dom": "^18",

Which area(s) are affected? (Select all that apply)

Use Cache

Which stage(s) are affected? (Select all that apply)

next start (local)

Additional context

No response

extent analysis

TL;DR

The Router Cache Duration for statically rendered pages appears to be 30 seconds instead of the expected 5 minutes, causing the client to send requests to the server after the cache expires.

Guidance

  • Verify the next.config.js file for any custom cache configurations that might be overriding the default Router Cache Duration.
  • Check the Next.js documentation for any specific settings or environment variables that could be affecting the cache duration.
  • Test the application with a different version of Next.js to see if the issue persists, potentially indicating a version-specific bug.
  • Review the Vercel configuration, as the issue is observed on a Vercel-hosted demo, to ensure that there are no cache settings overriding the Next.js defaults.

Example

No specific code example is provided due to the lack of direct code references in the issue, but checking the next.config.js for something like experimental.cache settings could be a starting point.

Notes

The issue seems to be specific to the combination of Next.js version 14.2.35 and Vercel hosting. Without more details on the project's configuration, it's challenging to provide a precise fix.

Recommendation

Apply a workaround by explicitly setting the cache duration in next.config.js if possible, as the current behavior does not match the documented expectations, and upgrading to a potentially fixed version is not explicitly suggested by the provided information.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING