-
Notifications
You must be signed in to change notification settings - Fork 27k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
static
Router Cache is used once, the value of staleTimes.dynamic
is applied the next time.
#66513
Comments
static
Router Cache is used once, the value of staleTimes.dynamic
is applied the next time.
Hi @AkifumiSato -- the names "static" and "dynamic" do not relate to the page rendering type, but rather different categories of "liveness" that can be configured. The actual heuristic of whether to use
So in this case,
If you modify the Link components to have Let me know if I misunderstood your question! |
@ztanner Thank you for response.
I tried with next.js/packages/next/src/client/components/router-reducer/reducers/navigate-reducer.ts Lines 213 to 215 in 750ae91
I think the documentation needs to be changed to describe up to the first use of the cache or to a simpler specification. What do you think? |
Ahh, I see what you mean @AkifumiSato -- let me take a closer look at why we needed that condition and I'll get back to you! |
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Link to the code that reproduces this issue
https://github.com/AkifumiSato/nextjs-stale-time-issue-demo
To Reproduce
pnpm clean-start
.http://localhost:3000
./static
./
soon(under 3 seconds)./static
again.Current vs. Expected behavior
My
staleTimes
configuration is:I expect that
staleTimes.static
is applied all times, but only the first time. After that,staleTimes.dynamic
is applied.Provide environment information
$ pnpm next info Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 23.3.0: Wed Dec 20 21:30:44 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T6000 Available memory (MB): 65536 Available CPU cores: 10 Binaries: Node: 20.12.2 npm: 9.8.0 Yarn: 1.22.22 pnpm: 8.15.7 Relevant Packages: next: 14.2.3 // Latest available version is detected (14.2.3). eslint-config-next: N/A react: 18.3.1 react-dom: 18.3.1 typescript: 5.4.5 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Navigation
Which stage(s) are affected? (Select all that apply)
next start (local)
Additional context
No response
The text was updated successfully, but these errors were encountered: