Interface CachePolicy

interface CachePolicy {
    cacheIntervalSec: number;
    canCache: boolean | "public";
    mustRevalidate?: boolean;
}

Properties

cacheIntervalSec: number

The duration to allow caching for, in seconds from the time of the response. This is ignored if canCache is false.

canCache: boolean | "public"

false - never cache true - can be cached, but not publicly "public" - CDNs, ISPs, proxies, etc. are allowed to cache the response, which is insecure

mustRevalidate?: boolean

If true, the client must revalidate the cache against the server.

false