Composable Caching
The 'use cache' directive enables fine-grained caching at the function level. Combined with cacheTag, you can invalidate specific cache entries on demand.
Cached Timestamp
Uses cacheLife("default") preset from next.config.ts. Refresh the page - the timestamp stays the same until cache expires or is revalidated.
Timestamp: 2025-11-30T06:17:53.943Z
Random ID: kgxqn
Cached Quote
Uses cacheLife("hours") for longer caching. Different cache tags allow independent invalidation.
Innovation distinguishes between a leader and a follower.
How it works
- 1. Functions with 'use cache' are cached automatically
- 2. cacheLife() sets how long the cache is valid
- 3. cacheTag() assigns tags for selective revalidation
- 4. revalidateTag() invalidates cache entries by tag