UNPKG

@anthro.id/express-cache-control

Version:

Apply a cache control header through Express middleware.

15 lines (13 loc) 514 B
export interface CacheControlOptions extends Partial<Record<"private" | "public" | "immutable" | `no${"Cache" | "Store" | "Transform"}` | "proxyRevalidate" | `must${"Revalidate" | "Understand"}`, boolean>>, Partial<Record<"sMaxAge" | "maxAge" | `stale${"IfError" | "WhileRevalidate"}`, number>> { } declare namespace Express { interface Response { cacheControl?: CacheControlOptions; } } declare module "http" { interface ServerResponse { cacheControl?: CacheControlOptions; } }