domains / families / software-engineering / next-cache-components
next-cache-components
separate
Next.js 16 Cache Components - PPR, use cache directive, cacheLife, cacheTag, updateTag
When to use
- Next.js 16 Cache Components
- Partial Prerendering (PPR)
- use cache directive
- cacheLife configuration
- cacheTag tagging
- updateTag invalidation
- revalidateTag background revalidation
- Static, cached, and dynamic content mixing
When not to use
- **Edge runtime not supported** - requires Node.js
- **Static export not supported** - needs server
- **Non-deterministic values** (`Math.random()`, `Date.now()`) execute once at build time inside `use cache`
- [Cache Components Guide](https://nextjs.org/docs/app/getting-started/cache-components)
- [use cache Directive](https://nextjs.org/docs/app/api-reference/directives/use-cache)
- [unstable_cache (legacy)](https://nextjs.org/docs/app/api-reference/functions/unstable_cache)
Skill page
Source