revalidation
Refreshing cached data or pages so they show new content, either after a time limit or on demand.
In more detail
Time-based: export const revalidate = 3600 or next: { revalidate: 3600 } keeps data for an hour, then refreshes it in the background on the next request. On demand: call revalidatePath or revalidateTag after a mutation.
Related terms
- revalidatePath — A function from next/cache that invalidates cached data and pages for a given URL path.
- revalidateTag — A function from next/cache that invalidates every cached entry labelled with a given tag, across all routes.
- incremental static regeneration — Re-rendering a static page in the background after a set time or on demand, without rebuilding the whole site.
- stale-while-revalidate — A caching strategy that answers immediately from the cache, even if out of date, while fetching a fresh copy in the background for next time.
Taught in
- Data Cache: Cross-Request Persistence & Fetch Tags — Next.js 15 & Modern App Router Architecture
- Full Route Cache: Static Rendering & Segment Config — Next.js 15 & Modern App Router Architecture
- Router Cache: In-Memory Client Prefetch Semantics — Next.js 15 & Modern App Router Architecture
- Revalidation Strategies: revalidatePath & Cache Life — Next.js 15 & Modern App Router Architecture