[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7BY3WHG4AFREKMJTRV11X19":3,"skill-same:01M7BY3WHG4AFREKMJTRV11X19":47},{"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":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M7BY3WHG4AFREKMJTRV11X19","next-cache-components",null,"Next.js 16 Cache Components - PPR, use cache directive, cacheLife, cacheTag, updateTag","CognitionAI\u002Fdevin-marketplace","CognitionAI","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F163493330?v=4","01M7BVSRD98NC4FG8T3EZS6V5M","Cognition","01M7BVSRDX111C2XPWJ0E6MY26",29,"MIT","https:\u002F\u002Fgithub.com\u002FCognitionAI\u002Fdevin-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fvercel\u002Fskills\u002Fnext-cache-components\u002Fupstream\u002FSKILL.md",[],[],"2026-11-15 14:19:17",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","9836d94e88404aabb682086405c2aa9cba7657ac","plugins\u002Fvercel\u002Fskills\u002Fnext-cache-components\u002Fupstream",156,"https:\u002F\u002Fgithub.com\u002FCognitionAI\u002Fdevin-marketplace","https:\u002F\u002Fgithub.com\u002FCognitionAI","https:\u002F\u002Fcognition.ai\u002F","Makers of Devin, the AI software engineer.","2026-11-13 07:08:23",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add CognitionAI\u002Fdevin-marketplace --skill next-cache-components",{"tool":39,"command":40},"bunx","bunx skills add CognitionAI\u002Fdevin-marketplace --skill next-cache-components",{"tool":42,"command":43},"pnpm","pnpm dlx skills add CognitionAI\u002Fdevin-marketplace --skill next-cache-components","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FCognitionAI\u002Fdevin-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fvercel\u002Fskills\u002Fnext-cache-components\u002Fupstream\u002FSKILL.md",true,[],[48,54,61,67,74,81],{"skillNo":49,"name":50,"nameZh":6,"description":6,"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},"01M7BYC4AJGM98P2G9JH7QS24Z","business-data","https:\u002F\u002Fgithub.com\u002FCognitionAI\u002Fdevin-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fwindsor-ai\u002Fskills\u002Fbusiness-data\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},"01M7BYBZ0CD4CBCPZHRZ551BNK","workflow","Creates durable, resumable workflows using Vercel's Workflow SDK. Use when building workflows that need to survive restarts, pause for external events, retry on failure, or coordinate multi-step operations over time. Triggers on mentions of \"workflow\", \"durable functions\", \"resumable\", \"workflow sdk\", \"queue\", \"event\", \"push\", \"subscribe\", or step-based orchestration.","https:\u002F\u002Fgithub.com\u002FCognitionAI\u002Fdevin-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fvercel\u002Fskills\u002Fworkflow\u002Fupstream\u002FSKILL.md",[],[],{"skillNo":62,"name":56,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M7BYB1XSZHKHD8JZTQJ62JN0","Vercel Workflow SDK expert guidance. Use when building durable workflows, long-running tasks, API routes or agents that need pause\u002Fresume, retries, step-based execution, or crash-safe orchestration with Vercel Workflow.","https:\u002F\u002Fgithub.com\u002FCognitionAI\u002Fdevin-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fvercel\u002Fskills\u002Fworkflow\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M7BYASGMK935J33E21N5WTW0","verification","Full-story verification — infers what the user is building, then verifies the complete flow end-to-end: browser → API → data → response. Triggers on dev server start and 'why isn't this working' signals.","https:\u002F\u002Fgithub.com\u002FCognitionAI\u002Fdevin-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fvercel\u002Fskills\u002Fverification\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M7BY9WJERKSKEH9HK6E71GW2","vercel-storage","Vercel storage expert guidance — Blob, Global Config (formerly Edge Config), and Marketplace storage (Neon Postgres, Upstash Redis). Use when choosing, configuring, or using data storage with Vercel applications.","https:\u002F\u002Fgithub.com\u002FCognitionAI\u002Fdevin-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fvercel\u002Fskills\u002Fvercel-storage\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M7BY9N034894YV2J9DCRZHYS","vercel-services","Configure and troubleshoot Vercel Services for multiple frontends and backends in one project. Use when composing a polyglot or multi-service application on one Vercel deployment; defining the `services` key, service-targeted rewrites, or service bindings in `vercel.json`; or running all services with `vercel dev`.","https:\u002F\u002Fgithub.com\u002FCognitionAI\u002Fdevin-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fvercel\u002Fskills\u002Fvercel-services\u002FSKILL.md",[],[]]