-
Notifications
You must be signed in to change notification settings - Fork 130
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
[⚡ Feature]: Why does Cloudflare Pages still not support OnDemandRevalidate, even after Next.js 13 introduced a new revalidate function that runs on the edge? #292
Comments
To support TL;DR: it'll take some times |
Hey there, I'm afraid that at the moment there are limitations around how revalidation works. I'll try and explain this in a decent amount of detail for you. Apologies in advance for the long text. In When you opt for a route to be revalidated on an interval ( When a route does not opt into revalidation and is statically generated, it has no revalidation value, and the Prerender function has no value for its expiration, as it will not expire after x requests: Edge runtime routes generate Edge functions instead of Prerender functions. Now that I've given some background, I'll discuss why this is a problem for us. Cloudflare cannot deploy these Prerender functions. So, instead, we take the fallback static assets for the prerender functions that were generated at build time and use those instead. When you deploy to Vercel, they deploy the Node.js Prerender functions to AWS Lambda. Calling So to specifically talk about the main point of this issue, on-demand revalidation of a path is not possible as we are unable to deploy the Prerender functions that path revalidation uses.
The correct way to provide custom behaviour for the incremental cache and |
Hi, Any updates on this? CF have suggesting alternatives such as:
It's not as straightforward as importing a NextJS project, and we're uncertain if it's worth the hassle to incorporate. Cloudflare also offers build caching capabilities, detailed here: https://blog.cloudflare.com/race-ahead-with-build-caching/ We're unsure if it would serve the same purposes as ISR. Does anyone have experience with the above as an alternative solution to ISR? Thank you ! |
Description
Next.js 13 introduced revalidatePath, a feature that will run on the edge and revalidate the page on demand.
Please support this feature. It will help Next.js developers use Cloudflare Pages instead of Vercel.
Additional Information
No response
Would you like to help?
The text was updated successfully, but these errors were encountered: