Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
90e41cfb
Unverified
Commit
90e41cfb
authored
Oct 22, 2025
by
Joseph
Committed by
GitHub
Oct 22, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: cache components feedback (#85241)
Just a couple of mistakes
parent
8ede5d01
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
06-cache-components.mdx
docs/01-app/01-getting-started/06-cache-components.mdx
+2
-2
No files found.
docs/01-app/01-getting-started/06-cache-components.mdx
View file @
90e41cfb
...
@@ -267,7 +267,7 @@ Tag cached data with [`cacheTag`](/docs/app/api-reference/functions/cacheTag) an
...
@@ -267,7 +267,7 @@ Tag cached data with [`cacheTag`](/docs/app/api-reference/functions/cacheTag) an
#### With `updateTag`
#### With `updateTag`
Use
`updateTag`
when
you
need
to
expire
and
immediately
refresh
ing
cached
data
within
the
same
request
:
Use
`updateTag`
when
you
need
to
expire
and
immediately
refresh
cached
data
within
the
same
request
:
```tsx filename="app/actions.ts" highlight={1,4,5,13}
```tsx filename="app/actions.ts" highlight={1,4,5,13}
import { cacheTag, updateTag } from 'next/cache'
import { cacheTag, updateTag } from 'next/cache'
...
@@ -278,7 +278,7 @@ export async function getCart() {
...
@@ -278,7 +278,7 @@ export async function getCart() {
// fetch data
// fetch data
}
}
export async function updateCar
d
(itemId: string) {
export async function updateCar
t
(itemId: string) {
'use server'
'use server'
// write data using the itemId
// write data using the itemId
// update the user cart
// update the user cart
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment