Skip to content

Commit

Permalink
docs(staletime): add clarification around prefetch false (#65252)
Browse files Browse the repository at this point in the history
## Why?

Add clarification around when the `prefetch` prop on the `Link`
component is set to `false`.

- x-ref:
#51788 (comment)
-
https://github.com/vercel/next.js/blob/canary/test/e2e/app-dir/app-client-cache/client-cache.test.ts#L202

Closes NEXT-3275
  • Loading branch information
samcx authored May 1, 2024
1 parent dcb7e68 commit f2e7c8e
Showing 1 changed file with 2 additions and 2 deletions.
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](https://github.com/vercel/next.js/releases/tag/v14.2.0).

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

0 comments on commit f2e7c8e

Please sign in to comment.