Skip to content
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

next/link leads to a cached page #63898

Closed
One041 opened this issue Mar 30, 2024 · 2 comments
Closed

next/link leads to a cached page #63898

One041 opened this issue Mar 30, 2024 · 2 comments
Labels
bug Issue was opened via the bug report template. locked

Comments

@One041
Copy link

One041 commented Mar 30, 2024

Link to the code that reproduces this issue

https://github.com/One041/next_demo

To Reproduce

  1. Start the app in development mode (next dev).
  2. Open the home page in your browser (http://localhost:3000/)
  3. Check the random number on the page.
  4. Click the "Go to some page" button
  5. When second page loaded click "Go to home page" button
  6. Check again the random number on the page

Current vs. Expected behavior

Current behavior: the random number is the same
Expected behavior: the random number should change because this is SSR page

Provide environment information

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 10 Pro
Binaries:
  Node: 18.18.2
  npm: N/A
  Yarn: N/A
  pnpm: 8.15.3
Relevant Packages:
  next: 14.1.4
  eslint-config-next: 14.1.4
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.4.3
Next.js Config:
  output: N/A

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

App Router

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

next dev (local), next build (local), next start (local), Vercel (Deployed)

Additional context

There is deployed demo app: https://next-demo-pi-three.vercel.app/

@One041 One041 added the bug Issue was opened via the bug report template. label Mar 30, 2024
@ztanner
Copy link
Member

ztanner commented Mar 30, 2024

Hi, this is expected behavior, and you can learn a bit more about it in the Router Cache docs.

The router will cache the RSC data for your route for 30s. We're currently working on an experimental flag that will let you modify this behavior which we hope to land soon.

Keep an eye on #62856 which will soon let you specify how long the router cache will consider this data "reusable" for (a value of 0 would re-fetch the data every navigation).

@ztanner ztanner closed this as not planned Won't fix, can't repro, duplicate, stale Mar 30, 2024
Copy link
Contributor

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template. locked
Projects
None yet
Development

No branches or pull requests

2 participants