Caching, Revalidation, and Streaming
Master how the App Router caches fetched data, revalidates it on a schedule or on demand, and streams UI with Suspense for fast perceived loads.
Why Caching Matters
Refetching the same data on every request is slow and expensive. The App Router caches results so repeated requests are instant, while giving you control over how fresh that data stays.
The Default fetch Cache
In Server Components, the built-in fetch is extended. By default Next.js may cache responses so the same URL is not refetched within a render. You opt into freshness explicitly.
const res = await fetch('https://api.example.com/posts');
const posts = await res.json();All lessons in this course
- Server Components Deep Dive
- Client Components and Interactivity
- Advanced Data Fetching Patterns
- Caching, Revalidation, and Streaming