diff --git a/docs/02-app/02-api-reference/04-functions/cacheTag.mdx b/docs/02-app/02-api-reference/04-functions/cacheTag.mdx index 39a0d7e9e202c..db90a2e7199ce 100644 --- a/docs/02-app/02-api-reference/04-functions/cacheTag.mdx +++ b/docs/02-app/02-api-reference/04-functions/cacheTag.mdx @@ -143,11 +143,8 @@ export async function Bookings({ type = 'haircut' }) { You can use the data returned from an async function to tag the cache entry. -```tsx filename="app/components/bookings.tsx" -import { - unstable_cacheTag as cacheTag, - unstable_cacheLife as cacheLife, -} from 'next/cache' +```tsx filename="app/components/bookings.tsx" switcher +import { unstable_cacheTag as cacheTag } from 'next/cache' interface BookingsProps { type: string @@ -182,7 +179,7 @@ export async function Bookings({ type = 'haircut' }) { Using [`revalidateTag`](/docs/app/api-reference/functions/revalidateTag), you can invalidate the cache for a specific tag when needed: -```tsx filename="app/actions.ts" +```tsx filename="app/actions.ts" switcher 'use server' import { revalidateTag } from 'next/cache'