Docs
Caching

Overview

Learn about Caching mechanisms in Next.js for optimal performance and scalability.

Caching is a critical aspect of modern web applications, enhancing performance by reducing redundant computations, minimizing server load, and improving response times. Next.js provides several caching mechanisms tailored for various use cases, including server-side and client-side caching strategies.

Use CaseRecommended Strategy
Server-side disk cacheunstable_cache or "use cache" (canary)
Server-side deduplicationReact.cache
Client-side in-memory cacheSWR, React Query
Filesystem cacheCDN, Edge caching

In the starter kit we make use of following server-side caching: