Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(staletime): add clarification around prefetch false #65252

Merged
merged 3 commits into from
May 1, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/02-app/02-api-reference/05-next-config-js/staleTimes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: Learn how to override the invalidation time of the Client Router Ca

`staleTimes` is an experimental feature that allows configuring the [invalidation period](/docs/app/building-your-application/caching#duration-3) of the client router cache.

This configuration option is available as of v14.2.0-canary.53.
This configuration option is available as of [v14.2.0-canary.53](https://github.com/vercel/next.js/releases/tag/v14.2.0-canary.53).
samcx marked this conversation as resolved.
Show resolved Hide resolved

You can enable this experimental feature & provide custom revalidation times by setting the experimental `staleTimes` flag:

Expand All @@ -27,7 +27,7 @@ module.exports = nextConfig

The `static` and `dynamic` properties correspond with the time period (in seconds) based on different types of [link prefetching](/docs/app/api-reference/components/link#prefetch).

- The `dynamic` property is used when the `prefetch` prop on `Link` is left unspecified.
- The `dynamic` property is used when the `prefetch` prop on `Link` is left unspecified or is set to `false`.
- Default: 30 seconds
- The `static` property is used when the `prefetch` prop on `Link` is set to `true`, or when calling [`router.prefetch`](/docs/app/building-your-application/caching#routerprefetch).
- Default: 5 minutes
Expand Down