export interface CacheControlOptions { /** Methods whose responses get the header. Default `["GET", "HEAD"]`. */ readonly methods?: readonly string[]; /** Predicate over the response status. Default: 2xx only. */ readonly status?: (status: number) => boolean; /** When `true` (default), don't overwrite a `Cache-Control` the handler already set. */ readonly respectExisting?: boolean; } /** * Set a `Cache-Control` header on matching responses. `value` is either a fixed directive string or a * function of the request (return `undefined` to leave a response untouched - e.g. cache by path). * Defaults to `GET`/`HEAD` + 2xx, and never clobbers a `Cache-Control` the handler set itself. * * ```ts * app.use(cacheControl("public, max-age=3600, stale-while-revalidate=60")) * // or per-path: * app.use(cacheControl((req) => * new URL(req.url).pathname.startsWith("/assets/") ? "public, max-age=31536000, immutable" : undefined, * )) * ``` */ export declare function cacheControl(value: string | ((request: Request) => string | undefined), options?: CacheControlOptions): import("@nifrajs/core").IdentityPlugin; //# sourceMappingURL=cache-control.d.ts.map