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

Revalidate ignored for index route of a catch all route #65842

Closed
nsams opened this issue May 16, 2024 · 0 comments · Fixed by #65843
Closed

Revalidate ignored for index route of a catch all route #65842

nsams opened this issue May 16, 2024 · 0 comments · Fixed by #65843
Labels
bug Issue was opened via the bug report template. Runtime Related to Node.js or Edge Runtime with Next.js.

Comments

@nsams
Copy link
Contributor

nsams commented May 16, 2024

Link to the code that reproduces this issue

https://codesandbox.io/p/devbox/eager-field-nfwnh6?file=%2Fapp%2F%5B%5B...path%5D%5D%2Fpage.tsx%3A11%2C1&workspaceId=158e05b4-11a3-4a66-8a49-f399b2b301f5

To Reproduce

  1. start the application using next build && next start (done by codesandbox task)
  2. open / and refresh a few times
  3. notice the page re-renders every second
  4. open /foo and refresh a few times
  5. notice the page re-renders every 10 seconds (as specified by revalidate)

Current vs. Expected behavior

Full Route Cache should also respect revalidate for / route

Provide environment information

Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP PREEMPT_DYNAMIC Sun Aug  6 20:05:33 UTC 2023
  Available memory (MB): 4102
  Available CPU cores: 2
Binaries:
  Node: 20.9.0
  npm: 9.8.1
  Yarn: 1.22.19
  pnpm: 8.10.2
Relevant Packages:
  next: 14.3.0-canary.63 // Latest available version is detected (14.3.0-canary.63).
  eslint-config-next: N/A
  react: 19.0.0-beta-4508873393-20240430
  react-dom: 19.0.0-beta-4508873393-20240430
  typescript: 5.1.3
Next.js Config:
  output: N/A

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

Runtime

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

next start (local)

Additional context

No response

@nsams nsams added the bug Issue was opened via the bug report template. label May 16, 2024
@github-actions github-actions bot added the Runtime Related to Node.js or Edge Runtime with Next.js. label May 16, 2024
nsams added a commit to nsams/next.js that referenced this issue May 18, 2024
ijjk added a commit that referenced this issue May 20, 2024
fixes #65842

When setting revalidateTimings correctly use toRoute to convert `/index`
to `/`, like done for get
(https://github.com/vercel/next.js/blob/canary/packages/next/src/server/lib/incremental-cache/index.ts#L213)

See #65842 for reproduction codesandbox.

The bug also exists in 14.2.3 (and below) - before #64370

---------

Co-authored-by: JJ Kasper <jj@jjsweb.site>
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. Runtime Related to Node.js or Edge Runtime with Next.js.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant