cacheLife(profile) sets the lifetime of the use cache scope it's called in (it throws outside one). Each profile has three numbers, in seconds:
stale(client): how long the client router may reuse the result with no request. Sent asx-nextjs-stale-time; the docs say the router enforces at least 30 s.revalidate(server): after this, the entry is due for regeneration. Like ISR, a prerendered page is served stale while it regenerates in the background.expire(server): after this, the old entry may not be served; the next request waits for fresh output. It must be greater thanrevalidate.
Presets in Next.js 16.4.5 (stale / revalidate / expire): default 5 min / 15 min / 1 year; seconds 30 s / 1 s / 1 min; minutes 5 min / 1 min / 1 h; hours 5 min / 1 h / 1 day; days 5 min / 1 day / 1 week; weeks 5 min / 1 week / 30 days; max 5 min / 30 days / 1 year. You can pass an inline object, define named profiles under cacheLife in next.config, or redefine the presets.
For a prerendered page, the profile becomes the HTTP header: Cache-Control: s-maxage=<revalidate>, stale-while-revalidate=<expire − revalidate>.
Short lifetimes change where content can live. revalidate: 0, expire under 5 minutes, or stale under 30 s exclude the scope from prerendering: it becomes a request-time hole that needs <Suspense>. Of the presets only seconds crosses a threshold.
Nesting: a use cache without its own cacheLife takes the shortest lifetime of the caches inside it; an explicit cacheLife always wins.
Legacy: in Next.js 15 these were unstable_cacheLife and unstable_cacheTag; 16.0 dropped the prefix.