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

Search parameters are not invalidating notFound cached responses in rsc #70164

Open
richardasymmetric opened this issue Sep 16, 2024 · 0 comments · May be fixed by #69652
Open

Search parameters are not invalidating notFound cached responses in rsc #70164

richardasymmetric opened this issue Sep 16, 2024 · 0 comments · May be fixed by #69652
Labels
bug Issue was opened via the bug report template. Navigation Related to Next.js linking (e.g., <Link>) and navigation.

Comments

@richardasymmetric
Copy link

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.

@richardasymmetric richardasymmetric added the bug Issue was opened via the bug report template. label Sep 16, 2024
@github-actions github-actions bot added the Navigation Related to Next.js linking (e.g., <Link>) and navigation. label Sep 16, 2024
@richardasymmetric richardasymmetric changed the title Search parameters and notFound caches not found response Search parameters are not invalidating notFound cached responses in rsc Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue was opened via the bug report template. Navigation Related to Next.js linking (e.g., <Link>) and navigation.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant