Update a static page by event #16488
-
Feature requestProvide an API to update a static page not all of them. ProblemNEXTJS introduced Incremental Static Re-generation mechanism to update existing pages, but it's useless for cases like this:
Suggested solutionNextjs needs to provide an API to get a route and update/remove it. If ssgPurge called that page files removed from disk and memory; Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 18 comments 13 replies
-
|
Same issue here. |
Beta Was this translation helpful? Give feedback.
-
|
In the case of ISR, Next.js does not rebuild every page every time a change occurs, it only rebuilds the page when a user navigates to it and only if the page changed. When would your functions be called ? ISR seems to do exactly the same without having to manually call these functions. |
Beta Was this translation helpful? Give feedback.
-
|
Hi @Kroonax |
Beta Was this translation helpful? Give feedback.
-
|
My understanding of this feature is that it regenerates only after a page changed. So on each request page is checked for newer version (with comment in your example). User is served a stale version and newer is build in background. Next time any other user requests it, the newer version is served statically each time, until there is again newer version.
|
Beta Was this translation helpful? Give feedback.
-
|
Hi @pklepacki , |
Beta Was this translation helpful? Give feedback.
-
|
@MohammadPCh https://nextjs.org/blog/next-9-5#stable-incremental-static-regeneration
|
Beta Was this translation helpful? Give feedback.
-
|
@junkboy0315 |
Beta Was this translation helpful? Give feedback.
-
|
Same here. I'd love to update pages based on listening to events (CMS webhooks) |
Beta Was this translation helpful? Give feedback.
-
|
It would be absolutely great to have this, it would solve a ton of headaches and tradeoffs on my sites. |
Beta Was this translation helpful? Give feedback.
-
|
Here's a provisional solution: #22384 |
Beta Was this translation helpful? Give feedback.
-
|
Same here this is a huge gap from feature perspective specially if you pair Next with a headless CMS where content folks often modify and create new content. |
Beta Was this translation helpful? Give feedback.
-
|
Hi, looking for this feature too. |
Beta Was this translation helpful? Give feedback.
-
|
we really need that feature |
Beta Was this translation helpful? Give feedback.
-
|
This is really important, not sure why its not stressed our aalready! |
Beta Was this translation helpful? Give feedback.
-
|
Maybe automatically hitting the URL when content changes will do the trick 😕
Get Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: Alexandros Koukis ***@***.***>
Sent: Wednesday, December 29, 2021 11:39:48 AM
To: vercel/next.js ***@***.***>
Cc: Tony Beretini ***@***.***>; Comment ***@***.***>
Subject: Re: [vercel/next.js] Update a static page by event (Discussion #16488)
This is really important, not sure why its not stressed our aalready!
I can only clear the cache when rebuilding the product -.-
—
Reply to this email directly, view it on GitHub<#16488 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/APUUMIA6D4SZJ4Y5RBRKSBLUTNBWJANCNFSM4UGZ7AXQ>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
@enes-get-local sounds like a good challenge for you 😜 to work on |
Beta Was this translation helpful? Give feedback.
-
|
Next.js's developer promised he won't forget this problem:
|
Beta Was this translation helpful? Give feedback.
-
|
I'm incredibly excited to share that Next.js 12.1 was just released, which includes on-demand Incremental Static Regeneration! We know many of you have been looking forward to this for a while, including myself, and I'm so happy it is here. |
Beta Was this translation helpful? Give feedback.
I'm incredibly excited to share that Next.js 12.1 was just released, which includes on-demand Incremental Static Regeneration! We know many of you have been looking forward to this for a while, including myself, and I'm so happy it is here.