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: Fix typo in app/building-your-application/caching #54841

Merged
merged 5 commits into from
Sep 3, 2023
Merged
Changes from 2 commits
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
10 changes: 5 additions & 5 deletions docs/02-app/01-building-your-application/04-caching/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ This is similar to [**stale-while-revalidate**](https://web.dev/stale-while-reva

#### On-demand Revalidation

Data can be revalidated on-demand by path ([`revalidatePath`](#revalidatepath)) or by cache tag ([`revalidateTag`](#fetch-optionsnexttag-and-revalidatetag)).
Data can be revalidated on-demand by path ([`revalidatePath`](#revalidatepath)) or by cache tag ([`revalidateTag`](#fetch-optionsnexttags-and-revalidatetag)).

**How On-Demand Revalidation Works**

Expand Down Expand Up @@ -394,7 +394,7 @@ When configuring the different caching mechanisms, it's important to understand
### Data Cache and Client-side Router cache

- Revalidating the Data Cache in a [Route Handler](/docs/app/building-your-application/routing/route-handlers) **will not** immediately invalidate the Router Cache as the Router Handler isn't tied to a specific route. This means Router Cache will continue to serve the previous payload until a hard refresh, or the automatic invalidation period has elapsed.
- To immediately invalidate the Data Cache and Router cache, you can use [`revalidatePath`](#revalidatepath) or [`revalidateTag`](#fetch-optionsnexttag-and-revalidatetag) in a [Server Action](/docs/app/building-your-application/data-fetching/forms-and-mutations).
- To immediately invalidate the Data Cache and Router cache, you can use [`revalidatePath`](#revalidatepath) or [`revalidateTag`](#fetch-optionsnexttags-and-revalidatetag) in a [Server Action](/docs/app/building-your-application/data-fetching/forms-and-mutations).

## APIs

Expand All @@ -408,8 +408,8 @@ The following table provides an overview of how different Next.js APIs affect ca
| [`fetch`](#fetch) | | | Cache | Cache |
| [`fetch` `options.cache`](#fetch-optionscache) | | | Cache or Opt out | |
| [`fetch` `options.next.revalidate`](#fetch-optionsnextrevalidate) | | Revalidate | Revalidate | |
| [`fetch` `options.next.tags`](#fetch-optionsnexttag-and-revalidatetag) | | Cache | Cache | |
| [`revalidateTag`](#fetch-optionsnexttag-and-revalidatetag) | | Revalidate | Revalidate | |
| [`fetch` `options.next.tags`](#fetch-optionsnexttags-and-revalidatetag) | | Cache | Cache | |
leerob marked this conversation as resolved.
Show resolved Hide resolved
| [`revalidateTag`](#fetch-optionsnexttags-and-revalidatetag) | | Revalidate | Revalidate | |
| [`revalidatePath`](#revalidatepath) | | Revalidate | Revalidate | |
| [`const revalidate`](#segment-config-options) | | Revalidate or Opt out | Revalidate or Opt out | |
| [`const dynamic`](#segment-config-options) | | Cache or Opt out | Cache or Opt out | |
Expand Down Expand Up @@ -476,7 +476,7 @@ fetch(`https://...`, { next: { revalidate: 3600 } })

See the [`fetch` API reference](/docs/app/api-reference/functions/fetch) for more options.

### `fetch options.next.tag` and `revalidateTag`
### `fetch options.next.tags` and `revalidateTag`

Next.js has a cache tagging system for fine-grained data caching and revalidation.

Expand Down