@@ -112,7 +113,7 @@ This means `use cache` cannot be used with [runtime data](/docs/app/getting-star
...
@@ -112,7 +113,7 @@ This means `use cache` cannot be used with [runtime data](/docs/app/getting-star
## `use cache` at runtime
## `use cache` at runtime
On the **server**, the cache entries of individual components or functions will be cached in-memory.
On the **server**, the cache entries of individual components or functions will be cached in-memory by default. You can customize the cache storage by configuring [`cacheHandlers`](/docs/app/api-reference/config/next-config-js/cacheHandlers) in your `next.config.js` file.
Then, on the **client**, any content returned from the server cache will be stored in the browser'smemoryforthedurationofthesessionoruntil[revalidated](#during-revalidation).
Then, on the **client**, any content returned from the server cache will be stored in the browser'smemoryforthedurationofthesessionoruntil[revalidated](#during-revalidation).
@@ -6,7 +6,7 @@ description: Configure the Next.js cache used for storing and revalidating data
...
@@ -6,7 +6,7 @@ description: Configure the Next.js cache used for storing and revalidating data
You can configure the Next.js cache location if you want to persist cached pages and data to durable storage, or share the cache across multiple containers or instances of your Next.js application.
You can configure the Next.js cache location if you want to persist cached pages and data to durable storage, or share the cache across multiple containers or instances of your Next.js application.
> **Good to know**: The `cacheHandler` configuration is specifically used by Next.js for server cache operations such as storing and revalidating ISR and route handler responses. It is not used by `'use cache'`, `'use cache: remote'`, nor `'use cache: private'`, which manage their own cache independently.
> **Good to know**: The `cacheHandler` (singular) configuration is specifically used by Next.js for server cache operations such as storing and revalidating ISR and route handler responses. It is **not** used by `'use cache'` directives. For `'use cache'` directives, use [`cacheHandlers`](/docs/app/api-reference/config/next-config-js/cacheHandlers) (plural) instead.