Next.js Cache Components

Use this skill when

Use when changing Next.js 16 Cache Components, PPR, cacheComponents, use cache, cacheLife, cacheTag, updateTag, revalidateTag, or Suspense boundaries around dynamic runtime data.

Workflow

  1. Confirm whether cacheComponents is enabled in next.config.*.
  2. Classify content as static, cached, or dynamic runtime data.
  3. Keep cookies(), headers(), and searchParams out of cached functions unless using a documented private cache pattern.
  4. Pair mutations with the correct invalidation primitive.
  5. Validate with bun run build when local toolchain permits.

Skill graph

Read references/graph.md for routing. Related skills: next-best-practices, testing-infra, vercel-deployment.

References

Scripts

See scripts/README.md. Run the inspector before broad changes.

Assets

See assets/README.md for checklists and evals.