-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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-1161] Cached data is used after reloading immediately deployed app #48985
Comments
it seems related to https://github.com/orgs/vercel/discussions/1808 and https://github.com/orgs/vercel/discussions/1991 |
This is happening. 10 days old stale data is being shown even after deploying. Even though revalidate time is 24 hours. |
We just ran into a similar bug where when we set the revalidate on the fetch method to 24 hours, nothing ever revalidates. We've had a page which displayed stale data even after 4 days. const response = await fetch(url, {
next: {
revalidate: 86400
},
}); The moment we changed it down to 1 hour, everything revalidated after the new deployment. |
I've just tried this. By reducing the revalidate time to 1 hour does not resolve the issue for me. When I refresh the page just after having deployed it, it still shows the stale data. My guess is that by reducing the revalidation time we are just reducing the waiting time the data needs to eventually be purged by Vercel infra. I say that because I'm running another environment for the same project but setting the revalidation time to 3 sec. This one probably has the same issue but we do not perceive it because the waiting time is too short. @timneutkens are you able to give some guidance on how to avoid this issue when setting long revalidate times? |
is it only me or it's shocking how such a major framework has bugs in it's core functionalities |
Verify canary release
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 21.6.0: Sat Jun 18 17:07:22 PDT 2022; root:xnu-8020.140.41~1/RELEASE_ARM64_T6000 Binaries: Node: 18.16.0 npm: 9.5.1 Yarn: N/A pnpm: N/A Relevant packages: next: 13.3.2-canary.13 eslint-config-next: 13.3.1 react: 18.2.0 react-dom: 18.2.0
Which area(s) of Next.js are affected? (leave empty if unsure)
App directory (appDir: true), Data fetching (gS(S)P, getInitialProps)
Link to the code that reproduces this issue
https://github.com/zartinn/nextjs-vercel-cache-testing
To Reproduce
curl -X POST https://api.vercel.com/v1/integrations/deploy/prj_OJkGJqg01lu7a2xuu2hGtntmqb4m/96mk0aXWzW\?buildCache\=false
--> at second page load you should see an old value for the HTML
Describe the Bug
Prerequesites for error:
Description
buildCache=false
buildCache=false
that the deployed app after the reload shows an old cache from an earlier deploy where I didn't usedbuildCache=false
.buildCache=false
at all will not update the data at all btw (issue on its own?)Really strange caching error. Even stranger is it that the reload must happen pretty quickly in order that the old cache show up. When I wait about a minute on the page and reload then (and all reloads afterwards) show the correct data.
Expected Behavior
Old weird cache should never be visible after reload
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
Vercel
NEXT-1161
The text was updated successfully, but these errors were encountered: