You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I verified that the issue exists in the latest Next.js canary release
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 21.6.0: Mon Aug 22 20:20:05 PDT 2022; root:xnu-8020.140.49~2/RELEASE_ARM64_T8101
Binaries:
Node: 16.18.0
npm: 8.5.2
Yarn: 1.22.19
pnpm: N/A
Relevant packages:
next: 13.0.0
eslint-config-next: 13.0.0
react: 18.2.0
react-dom: 18.2.0
What browser are you using? (if relevant)
Chrome 106.0.5249.119
How are you deploying your application? (if relevant)
next start
Describe the Bug
Multiple fetches in the same server component get revalidated whenever any one of them revalidates, whether it's static or dynamic.
For example, if a static fetch(cache: 'force-cache') and a dynamic fetch(cache: 'no-cache') are in the same server component, whenever a dynamic fetch revalidates, the static fetch also gets revalidated.
plastic041
changed the title
All fetch()s gets revalidates whenever any one of them gets revalidated, regardless of cache settings. Next.js 13
fetch() gets revalidates, ignoring cache settings. Next.js 13
Oct 28, 2022
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
Verify canary release
Provide environment information
What browser are you using? (if relevant)
Chrome 106.0.5249.119
How are you deploying your application? (if relevant)
next start
Describe the Bug
Multiple fetches in the same server component get revalidated whenever any one of them revalidates, whether it's static or dynamic.
For example, if a static fetch(
cache: 'force-cache'
) and a dynamic fetch(cache: 'no-cache'
) are in the same server component, whenever a dynamic fetch revalidates, the static fetch also gets revalidated.Expected Behavior
Static data fetch should not be revalidated.
Link to reproduction
https://github.com/plastic041/next-13-fetch-reproduce
To Reproduce
npm install && npm run build && npm run start
localhost:3000
next: { revalidate: 3 }
)The text was updated successfully, but these errors were encountered: