RequestCacheControl

import { RequestCacheControl } from "jsr:@ende/http/unstable-cache-control";

interface ยท experimental

interface RequestCacheControl extends CacheControlBase

Cache-Control directives for requests (e.g. from a client).

See also

Properties

noCache

noCache?: true

When present, the cache must not use a stored response without revalidation.

maxStale

maxStale?: number | true

Accept stale responses. If a number, accept responses that have been stale for no more than this many seconds. If true, accept any staleness.

minFresh

minFresh?: number

Require the response to be fresh for at least this many seconds.

onlyIfCached

onlyIfCached?: true

Only return a cached response; do not forward the request to the origin.

Source