What problem does it solve?
Enables teams to mix static, cached, and dynamic content in the same Next.js route and removes uncertainty about cache lifetime, revalidation, and tag-based invalidation so pages stay fast while delivering fresh data where needed.
Core Features & Use Cases
- Partial Prerendering (PPR): Combine auto-prerendered static shells with cached and dynamic fragments for faster initial loads.
- Directive-based caching: Use the use cache directive and cacheLife profiles to declare cache behavior at function, component, or file level.
- Tag invalidation & revalidation: Mark cached data with cacheTag and trigger updates with updateTag or revalidateTag for immediate or background refreshes.
- Use Case: Migrate unstable_cache patterns to use cache, add tag-based invalidation for lists and items, and configure revalidation windows for dashboard metrics and notification streams.
Quick Start
Show how to migrate unstable_cache usages to use cache, add cacheTag and cacheLife calls, and configure tag revalidation for a Next.js 16 app with cacheComponents enabled.