Remove SSG/ISR pages on-demand without interacting with file system to manually delete from .next folder #77138
salahmedamin
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
Non-Goals
No response
Background
Taking an example of an ecommerce website with 5k+ trending products. To cache relevant data, creating a static page is a great way. But if products were changing every hour, there would be an accumulation of 5k+5k.
The goal here is to be able to eliminate non-relevant data in the cleanest possible way.
Current method now is to delete files from .next/server/pages/products/[id].html.
Proposal
Next to revalidate: 60s, a prop called deleteOnAbsent for example, that if not present, stays with current behaviour, else checks what was returned, and only keeps what was returned.
This would be called SR (Static Regeneration) and not ISR.
Beta Was this translation helpful? Give feedback.
All reactions