[]previous and next page

CacheControlOption

The option, as written.

The option, as written.

Import#

ts
import type { CacheControlOption } from "@shadow-js/dusk/server";

Signature#

ts
type CacheControlOption =
  | "no-store"
  | {
      /** `public` (any cache) or `private` (the browser only). Default `private`. */
      readonly visibility?: "public" | "private";
      /** Seconds the answer is fresh. Default 0. */
      readonly maxAge?: number;
      /** Seconds a stale answer may be served while it is refreshed. */
      readonly staleWhileRevalidate?: number;
      /** Request headers the answer depends on (added as `Vary`). */
      readonly vary?: readonly string[];
      /** A `cacheLife` profile: `maxAge` is its `stale`, `staleWhileRevalidate` its `revalidate`. */
      readonly profile?: string;
    }