Skip to content

docs: say which value wins when cacheLife runs more than once - #101005

Open
Vladimir-Pirotskiy wants to merge 1 commit into
vercel:canaryfrom
Vladimir-Pirotskiy:docs/cachelife-multiple-calls
Open

Vladimir-Pirotskiy wants to merge 1 commit into
vercel:canaryfrom
Vladimir-Pirotskiy:docs/cachelife-multiple-calls

Conversation

@Vladimir-Pirotskiy

@Vladimir-Pirotskiy Vladimir-Pirotskiy commented Oct 31, 2026 •

Copy link
Copy Markdown

The docs didn't say what happens when cacheLife is called more than once. In that case the shortest value is used, so this PR adds that.

When more than one cacheLife call runs in a cache scope, including
after an await, each of stale, revalidate and expire keeps the shortest
value. The note that advises one call per invocation did not say what
happens otherwise, so add that to it.

<!-- NEXT_JS_LLM -->
@github-actions github-actions Bot added the Documentation Related to Next.js' official documentation. label Oct 31, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Related to Next.js' official documentation.

1 participant