Next.js ISR ( Incremental Static Regeneration ), how to rebuild or update a specific page manually or dynamically before the interval/ISR time start?

Viewed 1719

In NextJS Production mode - In Incremental Static Regeneration, I have placed an auto revalidate interval to 604800 seconds(7 days). In the meantime I may need to update a specific page before the interval time start.

How can I rebuild/update a specific page without rebuilding the full site before the interval/ISR time start?

2 Answers

This is now possible in Next.js v12.1.

I saw this feature in the 12.1 release notes, it allows a manual cache purge for a page, on demand. using the unstable_revalidate() function.

I haven't tested it yet though but hope this helps.

On Demand Incremental Static Regeneration (beta)

Related