Amazon Vinyl
    Preparing search index...

    Type Alias CacheControl

    Represents all known Cache-Control directives.

    https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control

    type CacheControl = {
        immutable?: boolean;
        maxAge?: number;
        mustRevalidate?: boolean;
        noCache?: boolean;
        noStore?: boolean;
        onlyIfCached?: boolean;
        private?: boolean;
        public?: boolean;
        staleIfError?: number;
        staleWhileRevalidate?: number;
    }
    Index
    immutable?: boolean

    Indicates that the resource will not change, so it does not need to be revalidated. Example: immutable

    maxAge?: number

    The maximum amount of time (in seconds) a resource is considered fresh. Example: max-age=3600 (1 hour)

    mustRevalidate?: boolean

    Ensures that stale responses cannot be used without successful revalidation with the origin server. Example: must-revalidate

    noCache?: boolean

    Requires the resource to be revalidated with the origin server before serving it from the cache. Example: no-cache

    noStore?: boolean

    Prevents the resource from being cached by any mechanism. Example: no-store

    onlyIfCached?: boolean

    Indicates the client only wants a response from the cache and will not make a network request. Example: only-if-cached

    private?: boolean

    Indicates the resource is cacheable only by the user's browser or private caches, not shared caches. Example: private

    public?: boolean

    Indicates the resource is cacheable by both shared and private caches. Example: public

    staleIfError?: number

    Allows serving stale responses (in seconds) if the origin server is unavailable or returns an error. Example: stale-if-error=86400 (1 day)

    staleWhileRevalidate?: number

    Allows serving stale responses for the specified duration (in seconds) while asynchronously revalidating the cache. Example: stale-while-revalidate=60