Incremental-Static Regeneration (ISR)

The Next.js-specific line `export const revalidate = 30` has been added to the code for this page, which tells Next to perform cache invalidations for this page, but wait at least 30 seconds between them.
This means that its content is EITHER retrieved from the cache OR generated at run-time whenever the user requests the page, depending on the invalidation and elapsed time.

This is slower than a static site but it is capable of updating.

Try it by updating the note here and refreshing this page.

This is the content of that note, according to this page rendered with ISR:
Your first note!
Enter whatever text you want in here.
Save this url (or use the same username again from the main page) to come back here whenever you want.
You and anyone else can view and edit this page from any device!
And this is the value of "lastUpdated" for the note:
Fri May 02 2025 21:43:02 GMT+0000 (Coordinated Universal Time)

The pseudo-code for this page is:
export const revalidate = 30; 
 
export async function ISR({}) { 
    const pool = await DBConnector.getPool(); 
    const data = await pool.query("SELECT..."); 
 
    return <div> 
        The content of this page: {data} 
    </div>; 
} 
Back
5