[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M753M7T97Z4DMZCPA0CMZPP9":3,"skill-same:01M753M7T97Z4DMZCPA0CMZPP9":46},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":29,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M753M7T97Z4DMZCPA0CMZPP9","next-cache-components",null,"Next.js 16 Cache Components - PPR, use cache directive, cacheLife, cacheTag, updateTag","haryelramalho\u002Fskills","haryelramalho","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F38708454?v=4","01M753ESC6XNS6GXGV5X9YMKGA","Haryel Ramalho","01M753ESCSPRNDTEJRVRYY1VJ0",0,"MIT","https:\u002F\u002Fgithub.com\u002Fharyelramalho\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcommunity\u002Fnext-cache-components\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: next-cache-components\ndescription: Next.js 16 Cache Components - PPR, use cache directive, cacheLife, cacheTag, updateTag\n---\n\n# Cache Components (Next.js 16+)\n\nCache Components enable Partial Prerendering (PPR) - mix static, cached, and dynamic content in a single route.\n\n## Enable Cache Components\n\n```ts\n\u002F\u002F next.config.ts\nimport type { NextConfig } from 'next'\n\nconst nextConfig: NextConfig = {\n  cacheComponents: true,\n}\n\nexport default nextConfig\n```\n\nThis replaces the old `experimental.ppr` flag.\n\n---\n\n## Three Content Types\n\nWith Cache Components enabled, content falls into three categories:\n\n### 1. Static (Auto-Prerendered)\n\nSynchronous code, imports, pure computations - prerendered at build time:\n\n```tsx\nexport default function Page() {\n  return (\n    \u003Cheader>\n      \u003Ch1>Our Blog\u003C\u002Fh1>  {\u002F* Static - instant *\u002F}\n      \u003Cnav>...\u003C\u002Fnav>\n    \u003C\u002Fheader>\n  )\n}\n```\n\n### 2. Cached (`use cache`)\n\nAsync data that doesn't need fresh fetches every request:\n\n```tsx\nasync function BlogPosts() {\n  'use cache'\n  cacheLife('hours')\n\n  const posts = await db.posts.findMany()\n  return \u003CPostList posts={posts} \u002F>\n}\n```\n\n### 3. Dynamic (Suspense)\n\nRuntime data that must be fresh - wrap in Suspense:\n\n```tsx\nimport { Suspense } from 'react'\n\nexport default function Page() {\n  return (\n    \u003C>\n      \u003CBlogPosts \u002F>  {\u002F* Cached *\u002F}\n\n      \u003CSuspense fallback={\u003Cp>Loading...\u003C\u002Fp>}>\n        \u003CUserPreferences \u002F>  {\u002F* Dynamic - streams in *\u002F}\n      \u003C\u002FSuspense>\n    \u003C\u002F>\n  )\n}\n\nasync function UserPreferences() {\n  const theme = (await cookies()).get('theme')?.value\n  return \u003Cp>Theme: {theme}\u003C\u002Fp>\n}\n```\n\n---\n\n## `use cache` Directive\n\n### File Level\n\n```tsx\n'use cache'\n\nexport default async function Page() {\n  \u002F\u002F Entire page is cached\n  const data = await fetchData()\n  return \u003Cdiv>{data}\u003C\u002Fdiv>\n}\n```\n\n### Component Level\n\n```tsx\nexport async function CachedComponent() {\n  'use cache'\n  const data = await fetchData()\n  return \u003Cdiv>{data}\u003C\u002Fdiv>\n}\n```\n\n### Function Level\n\n```tsx\nexport async function getData() {\n  'use cache'\n  return db.query('SELECT * FROM posts')\n}\n```\n\n---\n\n## Cache Profiles\n\n### Built-in Profiles\n\n```tsx\n'use cache'                    \u002F\u002F Default: 5m stale, 15m revalidate\n```\n\n```tsx\n'use cache: remote'           \u002F\u002F Platform-provided cache (Redis, KV)\n```\n\n```tsx\n'use cache: private'          \u002F\u002F For compliance, allows runtime APIs\n```\n\n### `cacheLife()` - Custom Lifetime\n\n```tsx\nimport { cacheLife } from 'next\u002Fcache'\n\nasync function getData() {\n  'use cache'\n  cacheLife('hours')  \u002F\u002F Built-in profile\n  return fetch('\u002Fapi\u002Fdata')\n}\n```\n\nBuilt-in profiles: `'default'`, `'minutes'`, `'hours'`, `'days'`, `'weeks'`, `'max'`\n\n### Inline Configuration\n\n```tsx\nasync function getData() {\n  'use cache'\n  cacheLife({\n    stale: 3600,      \u002F\u002F 1 hour - serve stale while revalidating\n    revalidate: 7200, \u002F\u002F 2 hours - background revalidation interval\n    expire: 86400,    \u002F\u002F 1 day - hard expiration\n  })\n  return fetch('\u002Fapi\u002Fdata')\n}\n```\n\n---\n\n## Cache Invalidation\n\n### `cacheTag()` - Tag Cached Content\n\n```tsx\nimport { cacheTag } from 'next\u002Fcache'\n\nasync function getProducts() {\n  'use cache'\n  cacheTag('products')\n  return db.products.findMany()\n}\n\nasync function getProduct(id: string) {\n  'use cache'\n  cacheTag('products', `product-${id}`)\n  return db.products.findUnique({ where: { id } })\n}\n```\n\n### `updateTag()` - Immediate Invalidation\n\nUse when you need the cache refreshed within the same request:\n\n```tsx\n'use server'\n\nimport { updateTag } from 'next\u002Fcache'\n\nexport async function updateProduct(id: string, data: FormData) {\n  await db.products.update({ where: { id }, data })\n  updateTag(`product-${id}`)  \u002F\u002F Immediate - same request sees fresh data\n}\n```\n\n### `revalidateTag()` - Background Revalidation\n\nUse for stale-while-revalidate behavior:\n\n```tsx\n'use server'\n\nimport { revalidateTag } from 'next\u002Fcache'\n\nexport async function createPost(data: FormData) {\n  await db.posts.create({ data })\n  revalidateTag('posts')  \u002F\u002F Background - next request sees fresh data\n}\n```\n\n---\n\n## Runtime Data Constraint\n\n**Cannot** access `cookies()`, `headers()`, or `searchParams` inside `use cache`.\n\n### Solution: Pass as Arguments\n\n```tsx\n\u002F\u002F Wrong - runtime API inside use cache\nasync function CachedProfile() {\n  'use cache'\n  const session = (await cookies()).get('session')?.value  \u002F\u002F Error!\n  return \u003Cdiv>{session}\u003C\u002Fdiv>\n}\n\n\u002F\u002F Correct - extract outside, pass as argument\nasync function ProfilePage() {\n  const session = (await cookies()).get('session')?.value\n  return \u003CCachedProfile sessionId={session} \u002F>\n}\n\nasync function CachedProfile({ sessionId }: { sessionId: string }) {\n  'use cache'\n  \u002F\u002F sessionId becomes part of cache key automatically\n  const data = await fetchUserData(sessionId)\n  return \u003Cdiv>{data.name}\u003C\u002Fdiv>\n}\n```\n\n### Exception: `use cache: private`\n\nFor compliance requirements when you can't refactor:\n\n```tsx\nasync function getData() {\n  'use cache: private'\n  const session = (await cookies()).get('session')?.value  \u002F\u002F Allowed\n  return fetchData(session)\n}\n```\n\n---\n\n## Cache Key Generation\n\nCache keys are automatic based on:\n- **Build ID** - invalidates all caches on deploy\n- **Function ID** - hash of function location\n- **Serializable arguments** - props become part of key\n- **Closure variables** - outer scope values included\n\n```tsx\nasync function Component({ userId }: { userId: string }) {\n  const getData = async (filter: string) => {\n    'use cache'\n    \u002F\u002F Cache key = userId (closure) + filter (argument)\n    return fetch(`\u002Fapi\u002Fusers\u002F${userId}?filter=${filter}`)\n  }\n  return getData('active')\n}\n```\n\n---\n\n## Complete Example\n\n```tsx\nimport { Suspense } from 'react'\nimport { cookies } from 'next\u002Fheaders'\nimport { cacheLife, cacheTag } from 'next\u002Fcache'\n\nexport default function DashboardPage() {\n  return (\n    \u003C>\n      {\u002F* Static shell - instant from CDN *\u002F}\n      \u003Cheader>\u003Ch1>Dashboard\u003C\u002Fh1>\u003C\u002Fheader>\n      \u003Cnav>...\u003C\u002Fnav>\n\n      {\u002F* Cached - fast, revalidates hourly *\u002F}\n      \u003CStats \u002F>\n\n      {\u002F* Dynamic - streams in with fresh data *\u002F}\n      \u003CSuspense fallback={\u003CNotificationsSkeleton \u002F>}>\n        \u003CNotifications \u002F>\n      \u003C\u002FSuspense>\n    \u003C\u002F>\n  )\n}\n\nasync function Stats() {\n  'use cache'\n  cacheLife('hours')\n  cacheTag('dashboard-stats')\n\n  const stats = await db.stats.aggregate()\n  return \u003CStatsDisplay stats={stats} \u002F>\n}\n\nasync function Notifications() {\n  const userId = (await cookies()).get('userId')?.value\n  const notifications = await db.notifications.findMany({\n    where: { userId, read: false }\n  })\n  return \u003CNotificationList items={notifications} \u002F>\n}\n```\n\n---\n\n## Migration from Previous Versions\n\n| Old Config | Replacement |\n|-----------|-------------|\n| `experimental.ppr` | `cacheComponents: true` |\n| `dynamic = 'force-dynamic'` | Remove (default behavior) |\n| `dynamic = 'force-static'` | `'use cache'` + `cacheLife('max')` |\n| `revalidate = N` | `cacheLife({ revalidate: N })` |\n| `unstable_cache()` | `'use cache'` directive |\n\n### Migrating `unstable_cache` to `use cache`\n\n`unstable_cache` has been replaced by the `use cache` directive in Next.js 16. When `cacheComponents` is enabled, convert `unstable_cache` calls to `use cache` functions:\n\n**Before (`unstable_cache`):**\n\n```tsx\nimport { unstable_cache } from 'next\u002Fcache'\n\nconst getCachedUser = unstable_cache(\n  async (id) => getUser(id),\n  ['my-app-user'],\n  {\n    tags: ['users'],\n    revalidate: 60,\n  }\n)\n\nexport default async function Page({ params }: { params: Promise\u003C{ id: string }> }) {\n  const { id } = await params\n  const user = await getCachedUser(id)\n  return \u003Cdiv>{user.name}\u003C\u002Fdiv>\n}\n```\n\n**After (`use cache`):**\n\n```tsx\nimport { cacheLife, cacheTag } from 'next\u002Fcache'\n\nasync function getCachedUser(id: string) {\n  'use cache'\n  cacheTag('users')\n  cacheLife({ revalidate: 60 })\n  return getUser(id)\n}\n\nexport default async function Page({ params }: { params: Promise\u003C{ id: string }> }) {\n  const { id } = await params\n  const user = await getCachedUser(id)\n  return \u003Cdiv>{user.name}\u003C\u002Fdiv>\n}\n```\n\nKey differences:\n- **No manual cache keys** - `use cache` generates keys automatically from function arguments and closures. The `keyParts` array from `unstable_cache` is no longer needed.\n- **Tags** - Replace `options.tags` with `cacheTag()` calls inside the function.\n- **Revalidation** - Replace `options.revalidate` with `cacheLife({ revalidate: N })` or a built-in profile like `cacheLife('minutes')`.\n- **Dynamic data** - `unstable_cache` did not support `cookies()` or `headers()` inside the callback. The same restriction applies to `use cache`, but you can use `'use cache: private'` if needed.\n\n---\n\n## Limitations\n\n- **Edge runtime not supported** - requires Node.js\n- **Static export not supported** - needs server\n- **Non-deterministic values** (`Math.random()`, `Date.now()`) execute once at build time inside `use cache`\n\nFor request-time randomness outside cache:\n\n```tsx\nimport { connection } from 'next\u002Fserver'\n\nasync function DynamicContent() {\n  await connection()  \u002F\u002F Defer to request time\n  const id = crypto.randomUUID()  \u002F\u002F Different per request\n  return \u003Cdiv>{id}\u003C\u002Fdiv>\n}\n```\n\nSources:\n- [Cache Components Guide](https:\u002F\u002Fnextjs.org\u002Fdocs\u002Fapp\u002Fgetting-started\u002Fcache-components)\n- [use cache Directive](https:\u002F\u002Fnextjs.org\u002Fdocs\u002Fapp\u002Fapi-reference\u002Fdirectives\u002Fuse-cache)\n- [unstable_cache (legacy)](https:\u002F\u002Fnextjs.org\u002Fdocs\u002Fapp\u002Fapi-reference\u002Ffunctions\u002Funstable_cache)\n","# Cache Components (Next.js 16+)\n\nCache Components enable Partial Prerendering (PPR) - mix static, cached, and dynamic content in a single route.\n\n## Enable Cache Components\n\n```ts\n\u002F\u002F next.config.ts\nimport type { NextConfig } from 'next'\n\nconst nextConfig: NextConfig = {\n  cacheComponents: true,\n}\n\nexport default nextConfig\n```\n\nThis replaces the old `experimental.ppr` flag.\n\n---\n\n## Three Content Types\n\nWith Cache Components enabled, content falls into three categories:\n\n### 1. Static (Auto-Prerendered)\n\nSynchronous code, imports, pure computations - prerendered at build time:\n\n```tsx\nexport default function Page() {\n  return (\n    \u003Cheader>\n      \u003Ch1>Our Blog\u003C\u002Fh1>  {\u002F* Static - instant *\u002F}\n      \u003Cnav>...\u003C\u002Fnav>\n    \u003C\u002Fheader>\n  )\n}\n```\n\n### 2. Cached (`use cache`)\n\nAsync data that doesn't need fresh fetches every request:\n\n```tsx\nasync function BlogPosts() {\n  'use cache'\n  cacheLife('hours')\n\n  const posts = await db.posts.findMany()\n  return \u003CPostList posts={posts} \u002F>\n}\n```\n\n### 3. Dynamic (Suspense)\n\nRuntime data that must be fresh - wrap in Suspense:\n\n```tsx\nimport { Suspense } from 'react'\n\nexport default function Page() {\n  return (\n    \u003C>\n      \u003CBlogPosts \u002F>  {\u002F* Cached *\u002F}\n\n      \u003CSuspense fallback={\u003Cp>Loading...\u003C\u002Fp>}>\n        \u003CUserPreferences \u002F>  {\u002F* Dynamic - streams in *\u002F}\n      \u003C\u002FSuspense>\n    \u003C\u002F>\n  )\n}\n\nasync function UserPreferences() {\n  const theme = (await cookies()).get('theme')?.value\n  return \u003Cp>Theme: {theme}\u003C\u002Fp>\n}\n```\n\n---\n\n## `use cache` Directive\n\n### File Level\n\n```tsx\n'use cache'\n\nexport default async function Page() {\n  \u002F\u002F Entire page is cached\n  const data = await fetchData()\n  return \u003Cdiv>{data}\u003C\u002Fdiv>\n}\n```\n\n### Component Level\n\n```tsx\nexport async function CachedComponent() {\n  'use cache'\n  const data = await fetchData()\n  return \u003Cdiv>{data}\u003C\u002Fdiv>\n}\n```\n\n### Function Level\n\n```tsx\nexport async function getData() {\n  'use cache'\n  return db.query('SELECT * FROM posts')\n}\n```\n\n---\n\n## Cache Profiles\n\n### Built-in Profiles\n\n```tsx\n'use cache'                    \u002F\u002F Default: 5m stale, 15m revalidate\n```\n\n```tsx\n'use cache: remote'           \u002F\u002F Platform-provided cache (Redis, KV)\n```\n\n```tsx\n'use cache: private'          \u002F\u002F For compliance, allows runtime APIs\n```\n\n### `cacheLife()` - Custom Lifetime\n\n```tsx\nimport { cacheLife } from 'next\u002Fcache'\n\nasync function getData() {\n  'use cache'\n  cacheLife('hours')  \u002F\u002F Built-in profile\n  return fetch('\u002Fapi\u002Fdata')\n}\n```\n\nBuilt-in profiles: `'default'`, `'minutes'`, `'hours'`, `'days'`, `'weeks'`, `'max'`\n\n### Inline Configuration\n\n```tsx\nasync function getData() {\n  'use cache'\n  cacheLife({\n    stale: 3600,      \u002F\u002F 1 hour - serve stale while revalidating\n    revalidate: 7200, \u002F\u002F 2 hours - background revalidation interval\n    expire: 86400,    \u002F\u002F 1 day - hard expiration\n  })\n  return fetch('\u002Fapi\u002Fdata')\n}\n```\n\n---\n\n## Cache Invalidation\n\n### `cacheTag()` - Tag Cached Content\n\n```tsx\nimport { cacheTag } from 'next\u002Fcache'\n\nasync function getProducts() {\n  'use cache'\n  cacheTag('products')\n  return db.products.findMany()\n}\n\nasync function getProduct(id: string) {\n  'use cache'\n  cacheTag('products', `product-${id}`)\n  return db.products.findUnique({ where: { id } })\n}\n```\n\n### `updateTag()` - Immediate Invalidation\n\nUse when you need the cache refreshed within the same request:\n\n```tsx\n'use server'\n\nimport { updateTag } from 'next\u002Fcache'\n\nexport async function updateProduct(id: string, data: FormData) {\n  await db.products.update({ where: { id }, data })\n  updateTag(`product-${id}`)  \u002F\u002F Immediate - same request sees fresh data\n}\n```\n\n### `revalidateTag()` - Background Revalidation\n\nUse for stale-while-revalidate behavior:\n\n```tsx\n'use server'\n\nimport { revalidateTag } from 'next\u002Fcache'\n\nexport async function createPost(data: FormData) {\n  await db.posts.create({ data })\n  revalidateTag('posts')  \u002F\u002F Background - next request sees fresh data\n}\n```\n\n---\n\n## Runtime Data Constraint\n\n**Cannot** access `cookies()`, `headers()`, or `searchParams` inside `use cache`.\n\n### Solution: Pass as Arguments\n\n```tsx\n\u002F\u002F Wrong - runtime API inside use cache\nasync function CachedProfile() {\n  'use cache'\n  const session = (await cookies()).get('session')?.value  \u002F\u002F Error!\n  return \u003Cdiv>{session}\u003C\u002Fdiv>\n}\n\n\u002F\u002F Correct - extract outside, pass as argument\nasync function ProfilePage() {\n  const session = (await cookies()).get('session')?.value\n  return \u003CCachedProfile sessionId={session} \u002F>\n}\n\nasync function CachedProfile({ sessionId }: { sessionId: string }) {\n  'use cache'\n  \u002F\u002F sessionId becomes part of cache key automatically\n  const data = await fetchUserData(sessionId)\n  return \u003Cdiv>{data.name}\u003C\u002Fdiv>\n}\n```\n\n### Exception: `use cache: private`\n\nFor compliance requirements when you can't refactor:\n\n```tsx\nasync function getData() {\n  'use cache: private'\n  const session = (await cookies()).get('session')?.value  \u002F\u002F Allowed\n  return fetchData(session)\n}\n```\n\n---\n\n## Cache Key Generation\n\nCache keys are automatic based on:\n- **Build ID** - invalidates all caches on deploy\n- **Function ID** - hash of function location\n- **Serializable arguments** - props become part of key\n- **Closure variables** - outer scope values included\n\n```tsx\nasync function Component({ userId }: { userId: string }) {\n  const getData = async (filter: string) => {\n    'use cache'\n    \u002F\u002F Cache key = userId (closure) + filter (argument)\n    return fetch(`\u002Fapi\u002Fusers\u002F${userId}?filter=${filter}`)\n  }\n  return getData('active')\n}\n```\n\n---\n\n## Complete Example\n\n```tsx\nimport { Suspense } from 'react'\nimport { cookies } from 'next\u002Fheaders'\nimport { cacheLife, cacheTag } from 'next\u002Fcache'\n\nexport default function DashboardPage() {\n  return (\n    \u003C>\n      {\u002F* Static shell - instant from CDN *\u002F}\n      \u003Cheader>\u003Ch1>Dashboard\u003C\u002Fh1>\u003C\u002Fheader>\n      \u003Cnav>...\u003C\u002Fnav>\n\n      {\u002F* Cached - fast, revalidates hourly *\u002F}\n      \u003CStats \u002F>\n\n      {\u002F* Dynamic - streams in with fresh data *\u002F}\n      \u003CSuspense fallback={\u003CNotificationsSkeleton \u002F>}>\n        \u003CNotifications \u002F>\n      \u003C\u002FSuspense>\n    \u003C\u002F>\n  )\n}\n\nasync function Stats() {\n  'use cache'\n  cacheLife('hours')\n  cacheTag('dashboard-stats')\n\n  const stats = await db.stats.aggregate()\n  return \u003CStatsDisplay stats={stats} \u002F>\n}\n\nasync function Notifications() {\n  const userId = (await cookies()).get('userId')?.value\n  const notifications = await db.notifications.findMany({\n    where: { userId, read: false }\n  })\n  return \u003CNotificationList items={notifications} \u002F>\n}\n```\n\n---\n\n## Migration from Previous Versions\n\n| Old Config | Replacement |\n|-----------|-------------|\n| `experimental.ppr` | `cacheComponents: true` |\n| `dynamic = 'force-dynamic'` | Remove (default behavior) |\n| `dynamic = 'force-static'` | `'use cache'` + `cacheLife('max')` |\n| `revalidate = N` | `cacheLife({ revalidate: N })` |\n| `unstable_cache()` | `'use cache'` directive |\n\n### Migrating `unstable_cache` to `use cache`\n\n`unstable_cache` has been replaced by the `use cache` directive in Next.js 16. When `cacheComponents` is enabled, convert `unstable_cache` calls to `use cache` functions:\n\n**Before (`unstable_cache`):**\n\n```tsx\nimport { unstable_cache } from 'next\u002Fcache'\n\nconst getCachedUser = unstable_cache(\n  async (id) => getUser(id),\n  ['my-app-user'],\n  {\n    tags: ['users'],\n    revalidate: 60,\n  }\n)\n\nexport default async function Page({ params }: { params: Promise\u003C{ id: string }> }) {\n  const { id } = await params\n  const user = await getCachedUser(id)\n  return \u003Cdiv>{user.name}\u003C\u002Fdiv>\n}\n```\n\n**After (`use cache`):**\n\n```tsx\nimport { cacheLife, cacheTag } from 'next\u002Fcache'\n\nasync function getCachedUser(id: string) {\n  'use cache'\n  cacheTag('users')\n  cacheLife({ revalidate: 60 })\n  return getUser(id)\n}\n\nexport default async function Page({ params }: { params: Promise\u003C{ id: string }> }) {\n  const { id } = await params\n  const user = await getCachedUser(id)\n  return \u003Cdiv>{user.name}\u003C\u002Fdiv>\n}\n```\n\nKey differences:\n- **No manual cache keys** - `use cache` generates keys automatically from function arguments and closures. The `keyParts` array from `unstable_cache` is no longer needed.\n- **Tags** - Replace `options.tags` with `cacheTag()` calls inside the function.\n- **Revalidation** - Replace `options.revalidate` with `cacheLife({ revalidate: N })` or a built-in profile like `cacheLife('minutes')`.\n- **Dynamic data** - `unstable_cache` did not support `cookies()` or `headers()` inside the callback. The same restriction applies to `use cache`, but you can use `'use cache: private'` if needed.\n\n---\n\n## Limitations\n\n- **Edge runtime not supported** - requires Node.js\n- **Static export not supported** - needs server\n- **Non-deterministic values** (`Math.random()`, `Date.now()`) execute once at build time inside `use cache`\n\nFor request-time randomness outside cache:\n\n```tsx\nimport { connection } from 'next\u002Fserver'\n\nasync function DynamicContent() {\n  await connection()  \u002F\u002F Defer to request time\n  const id = crypto.randomUUID()  \u002F\u002F Different per request\n  return \u003Cdiv>{id}\u003C\u002Fdiv>\n}\n```\n\nSources:\n- [Cache Components Guide](https:\u002F\u002Fnextjs.org\u002Fdocs\u002Fapp\u002Fgetting-started\u002Fcache-components)\n- [use cache Directive](https:\u002F\u002Fnextjs.org\u002Fdocs\u002Fapp\u002Fapi-reference\u002Fdirectives\u002Fuse-cache)\n- [unstable_cache (legacy)](https:\u002F\u002Fnextjs.org\u002Fdocs\u002Fapp\u002Fapi-reference\u002Ffunctions\u002Funstable_cache)\n",{"name":5,"description":7},"main","a5b533be2d244bbf3e5606e851742f0e0ba99423","skills\u002Fcommunity\u002Fnext-cache-components","https:\u002F\u002Fgithub.com\u002Fharyelramalho\u002Fskills","https:\u002F\u002Fgithub.com\u002Fharyelramalho","linkedin.com\u002Fin\u002Fharyelramalho\u002F","Software Engineer @ SKORR •  Former Vice President of the Junior Computer Association - TecnoJr","2026-07-16 01:34:58",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add haryelramalho\u002Fskills --skill next-cache-components",{"tool":38,"command":39},"bunx","bunx skills add haryelramalho\u002Fskills --skill next-cache-components",{"tool":41,"command":42},"pnpm","pnpm dlx skills add haryelramalho\u002Fskills --skill next-cache-components","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fharyelramalho\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcommunity\u002Fnext-cache-components\u002FSKILL.md",true,[],[47,54,61,68,75,82],{"skillNo":48,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":19},"01M753YDMKSDB7320THEQ2CVW5","to-prompt-opus","Use when preparing or rewriting prompts for Claude Opus 4.8, Anthropic API agents, XML-structured prompts, long-context document work, coding agents, research synthesis, frontend\u002Fdesign tasks, or model-specific prompt optimization. Do not use for GPT\u002FOpenAI prompts or raw context packaging without Opus-specific tuning.","https:\u002F\u002Fgithub.com\u002Fharyelramalho\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fmine\u002Fto-prompt-opus\u002FSKILL.md",[],[],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":19},"01M753YAP95W4K2MCEAEEAV6YA","to-prompt-gpt","Use when preparing or rewriting prompts for GPT-5.5, OpenAI API agents, Responses workflows, coding agents, research synthesis, support assistants, or model-specific prompt optimization. Do not use for Claude\u002FOpus prompts or raw context packaging without GPT-specific tuning.","https:\u002F\u002Fgithub.com\u002Fharyelramalho\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fmine\u002Fto-prompt-gpt\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M753Y700AZ0GVJDNW9Q1Q54F","plan-refactor-qa","Plans and runs qa-report before executing Compozy refactor tasks. Use when the user provides a refactor or issue slug and wants Codex to inspect the matching .compozy\u002Ftasks directory, related PRD\u002FTechSpec\u002FADR\u002Ftask artifacts, affected code, and existing tests, then invoke $qa-report with a repository-grounded prompt. Do not use to run tests, execute qa-execution, implement code, or perform post-refactor verification.","https:\u002F\u002Fgithub.com\u002Fharyelramalho\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fmine\u002Fplan-refactor-qa\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M753XZENG0Z8S2ET75EM8CGB","multi-tool-branch-review","Orchestrates a multi-tool branch review of the current git branch against a base branch. By default it runs two independent thermo-nuclear maintainability audits, one on Codex GPT-5.5 xhigh and one on Claude Opus xhigh, then consolidates the findings into a single remediation plan via writing-plans. If the user explicitly asks for native reviews, it can add the Claude native review pass, the Codex native review pass, or both. Use when the user wants a deep cross-model review of a branch or PR before merge, or asks to review this branch with multiple tools or models. Encodes known infra failure modes and their fixes (missing Claude ACP adapter, Codex MCP auth hangs, false-positive report files, long jobs orphaned inside subagents). Do not use for reviewing a single uncommitted snippet, for non-git work, for running only one reviewer, or when the user only wants a quick lint or test run.","https:\u002F\u002Fgithub.com\u002Fharyelramalho\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fmine\u002Fmulti-tool-branch-review\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M753XQM40XCK55BH5WPA88EW","create-pr-with-template","Create a GitHub Pull Request with gh CLI and prefer repository PR templates automatically. Use this whenever the user asks to open\u002Fcreate a PR, especially when template compliance is needed. If multiple templates exist, ask the user which template to use.","https:\u002F\u002Fgithub.com\u002Fharyelramalho\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fmine\u002Fcreate-pr-with-template\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M753XJMBJ8VFPRCDCC1JJ9G4","ui-craft","Provides guardrails for user-facing UI work: usability heuristics, accessibility floors, design-system discipline, component states, microcopy, motion, dark mode, responsive behavior, and human-AI UX. Use when designing, generating, reviewing, or refactoring visible product surfaces such as components, pages, dashboards, forms, dialogs, loading\u002Fempty\u002Ferror states, or AI interfaces. Do not use for backend-only work, infrastructure, CLI\u002FTUI design, or pure documentation editing.","https:\u002F\u002Fgithub.com\u002Fharyelramalho\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated\u002Fui-craft\u002FSKILL.md",[],[]]