ResponseCacheControl
import { ResponseCacheControl } from "jsr:@ende/http/unstable-cache-control";interface ยท experimental
interface ResponseCacheControl extends CacheControlBaseCache-Control directives for responses (e.g. from a server).
See also
Properties
noCache
noCache?: true | string[]When true, the response must not be used from cache without revalidation.
When an array, only the listed response header fields require revalidation;
the rest of the response may be used without it.
private
private?: true | string[]When true, the response is intended for a single user (private cache only).
When an array, only the listed header field names are private.
public
public?: trueThe response may be stored by any cache.
sMaxage
sMaxage?: numberShared (e.g. CDN) cache maximum age in seconds. Overrides max-age for shared caches.
mustRevalidate
mustRevalidate?: trueWhen stale, the cache must revalidate before using the response.
proxyRevalidate
proxyRevalidate?: trueSame as must-revalidate but applies only to shared caches.
mustUnderstand
mustUnderstand?: trueThe cache must not use the response if it does not understand the directive.
immutable
immutable?: trueThe response will not change while fresh; caches may reuse it without revalidation.
staleWhileRevalidate
staleWhileRevalidate?: numberAllow use of stale response while revalidating in the background (seconds).