Skip to main content

CacheConfig

A configuration option for the Cache-Control header in the AssetServerPlugin asset response.

Signature
type CacheConfig = {    maxAge: number;    restriction?: 'public' | 'private';}

maxAge

propertynumber

The max-age=N response directive indicates that the response remains fresh until N seconds after the response is generated.

restriction

property'public' | 'private'

The private response directive indicates that the response can be stored only in a private cache (e.g. local caches in browsers). The public response directive indicates that the response can be stored in a shared cache.

Was this chapter helpful?
Report Issue
Edited Feb 2, 2026·Edit this page