From 1beb7210e3a3a666794cb16974f7497f37bd686c Mon Sep 17 00:00:00 2001 From: Zack Tanner <1939140+ztanner@users.noreply.github.com> Date: Tue, 23 Jul 2024 06:39:52 -0700 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com> --- .../01-building-your-application/04-caching/index.mdx | 6 +++--- .../02-api-reference/05-next-config-js/staleTimes.mdx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/02-app/01-building-your-application/04-caching/index.mdx b/docs/02-app/01-building-your-application/04-caching/index.mdx index 9c1fd22136e01..fa203143acb29 100644 --- a/docs/02-app/01-building-your-application/04-caching/index.mdx +++ b/docs/02-app/01-building-your-application/04-caching/index.mdx @@ -335,9 +335,9 @@ With the Router Cache: The cache is stored in the browser's temporary memory. Two factors determine how long the router cache lasts: - **Session**: The cache persists across navigation. However, it's cleared on page refresh. -- **Automatic Invalidation Period**: The cache of layouts and loading states is automatically invalidated after a specific time. The duration depends on how the resource was [prefetched](/docs/app/api-reference/components/link#prefetch) & if the resource was [statically generated](/docs/app/building-your-application/rendering/server-components#static-rendering-default): - - **Default Prefetching** (`prefetch={null}` or unspecified): not cached for dynamic pages, 5 minutes for static pages - - **Full Prefetching**: (`prefetch={true}` or `router.prefetch`): 5 minutes for both static & dynamic pages +- **Automatic Invalidation Period**: The cache of layouts and loading states is automatically invalidated after a specific time. The duration depends on how the resource was [prefetched](/docs/app/api-reference/components/link#prefetch), and if the resource was [statically generated](/docs/app/building-your-application/rendering/server-components#static-rendering-default): + - **Default Prefetching** (`prefetch={null}` or unspecified): not cached for dynamic pages, 5 minutes for static pages. + - **Full Prefetching** (`prefetch={true}` or `router.prefetch`): 5 minutes for both static & dynamic pages. While a page refresh will clear **all** cached segments, the automatic invalidation period only affects the individual segment from the time it was prefetched. diff --git a/docs/02-app/02-api-reference/05-next-config-js/staleTimes.mdx b/docs/02-app/02-api-reference/05-next-config-js/staleTimes.mdx index f01079518567a..232765688ad5e 100644 --- a/docs/02-app/02-api-reference/05-next-config-js/staleTimes.mdx +++ b/docs/02-app/02-api-reference/05-next-config-js/staleTimes.mdx @@ -25,7 +25,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 page was neither statically generated nor fully prefetched (i.e. with `prefetch={true}`) +- The `dynamic` property is used when the page is neither statically generated nor fully prefetched (i.e., with prefetch={true}). - Default: 0 seconds (not cached) - The `static` property is used for statically generated pages, or 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