Search parameters are not invalidating notFound
cached responses in rsc
#70164
Labels
bug
Issue was opened via the bug report template.
Navigation
Related to Next.js linking (e.g., <Link>) and navigation.
Link to the code that reproduces this issue
https://codesandbox.io/p/devbox/zen-cache-g8k798?workspaceId=835aa8f9-26fc-4cf6-be40-c1760c26a9e1
To Reproduce
In the csb:
1. Go to the client page
2. It will start on the current year page 2024, which isn't found
3. go to 2025. It will not be found (despite being there)
4. Refresh the page on 2025, it will load.
5. Go back to 2024. Not found, as expected.
6. Return to 2025, Not found, this seems like a bug.
Current vs. Expected behavior
Expected: changing pages search params should cause the server component to re-render
Actual: once a
notFound
path is hit, the response seems to be cached.Provide environment information
Operating System: Platform: linux Arch: x64 Version: #41-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 2 20:41:06 UTC 2024 Available memory (MB): 32038 Available CPU cores: 16 Binaries: Node: 20.17.0 npm: Yarn: N/A pnpm: N/A Relevant Packages: next: 15.0.0-canary.156 eslint-config-next: 14.2.11 react: 19.0.0-rc-f2df5694-20240916 react-dom: 19.0.0-rc-f2df5694-20240916 typescript: 5.6.2
Which area(s) are affected? (Select all that apply)
Navigation
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
First noticed in 14.2, but I can reproduce in 15 canary-156. I haven't tried on vercel.
The text was updated successfully, but these errors were encountered: