Configuration
cacheHandlers configuration
The plural cacheHandlers setting selects storage implementations for cache directives. The following schematic points to a separately reviewed remote handler. It does not configure ISR or guarantee distributed consistency. Source: https://nextjs.org/docs/app/api-reference/config/next-config-js/cacheHandlers. Documentation-reviewed illustrative draft; exact package and execution not verified.
Formal Syntax & Structure
nextjs syntaxnextjs
cacheHandlers: { ... }Working Example
Example Snippetnextjs
import type { NextConfig } from 'next';// Configuration fragment; the reviewed remote handler is not included.const config: NextConfig = { cacheComponents: true, cacheHandlers: { remote: require.resolve('./reviewed-remote-cache.cjs') } };export default config;