What problem does it solve?
This Skill helps you configure Next.js 16+ Cache Components so you can combine partial prerendering (PPR) with predictable caching, without relying on deprecated experimental flags.
Core Features & Use Cases
- Cache Components Configuration: Enable cacheComponents in next.config.ts to replace the older experimental.ppr workflow.
- Three Rendering Modes in One Route: Use static auto-prerendering, async cached data with the use cache directive, and dynamic streaming via Suspense.
- Cache Controls: Apply cacheLife for lifetimes, cacheTag for tagged invalidation, and updateTag/revalidateTag for immediate vs background refresh behavior.
- Runtime Data Constraints: Enforce the rule that cookies/headers/searchParams can’t be accessed inside use cache unless you intentionally use use cache: private.
Quick Start
In your Next.js project, enable cacheComponents in next.config.ts and refactor your async components to use the use cache directive with cacheLife or cacheTag as needed for your data.