What problem does it solve?
This Skill provides a comprehensive reference for managing data fetching, caching strategies, and request/response manipulation within Next.js 16's App Router, enabling efficient and dynamic web applications.
Core Features & Use Cases
- Data Fetching & Caching: Understand
unstable_cache, 'use cache', cacheTag, and cacheLife for fine-grained control over data caching.
- Cache Invalidation: Learn to use
revalidatePath, revalidateTag, and updateTag to keep data fresh.
- Request/Response Handling: Master
cookies() and headers() for accessing request data, and after() for post-response actions.
- Dynamic Rendering: Utilize
connection() to opt-out of static rendering when necessary.
- Use Case: When building a dashboard that displays frequently updated user data, use this Skill to implement effective caching and revalidation strategies to ensure users see the most current information without overwhelming the server.
Quick Start
Explain how to use revalidateTag with the 'max' profile in a Server Action.