Next.js features an enterprise-grade multi-tier caching architecture designed to optimize latency and minimize database load. In Next.js 15, caching defaults are engineered to be uncached by default for fetch requests, ensuring developers have complete, explicit control over caching behaviors.
1. The Four Caching Layers in Next.js
1
Request Memoization (React Component Tree): Deduplicates identical fetch(url) calls made across multiple components during a single server render pass.
2
Data Cache (Persistent Cross-Request Cache): Stores data fetch results across user requests and deployments.
3
Full Route Cache (Server): Caches the rendered HTML and React Server Component Payload of static routes on the server.
4
Router Cache (Client Browser): In-memory cache in the browser that stores previously visited route segments for instant back/forward navigation.
2. Explicit Caching with fetch() in Next.js 15
In Next.js 15, fetch requests are no longer cached by default (defaulting to cache: 'no-store'). Developers explicitly define caching strategies:
1. Force Cache (Static Data)
Ideal for blog articles, course listings, or product catalogs that rarely change:
1// Cached persistently across all users and requests