Skip to content

Commit

Permalink
Add case-sensitive note for revalidateTag/revalidatePath (#61729)
Browse files Browse the repository at this point in the history
Our tag values are case-sensitive so this ensures we properly document
this so users are aware of this caveat.

x-ref:
#61392 (comment)

Closes NEXT-2379
  • Loading branch information
ijjk committed Feb 6, 2024
1 parent 9cadae5 commit daf8912
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ description: API Reference for the revalidatePath function.
revalidatePath(path: string, type?: 'page' | 'layout'): void;
```

- `path`: Either a string representing the filesystem path associated with the data you want to revalidate (for example, `/product/[slug]/page`), or the literal route segment (for example, `/product/123`). Must be less than 1024 characters.
- `path`: Either a string representing the filesystem path associated with the data you want to revalidate (for example, `/product/[slug]/page`), or the literal route segment (for example, `/product/123`). Must be less than 1024 characters. This value is case-sensitive.
- `type`: (optional) `'page'` or `'layout'` string to change the type of path to revalidate. If `path` contains a dynamic segment (for example, `/product/[slug]/page`), this parameter is required.

## Returns
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ description: API Reference for the revalidateTag function.
revalidateTag(tag: string): void;
```

- `tag`: A string representing the cache tag associated with the data you want to revalidate. Must be less than or equal to 256 characters.
- `tag`: A string representing the cache tag associated with the data you want to revalidate. Must be less than or equal to 256 characters. This value is case-sensitive.

You can add tags to `fetch` as follows:

Expand Down

0 comments on commit daf8912

Please sign in to comment.