UNPKG

@thisisagile/easy

Version:

Straightforward library for building domain-driven microservice architectures

25 lines (24 loc) 1.05 kB
import { CacheAge } from '../types/CacheAge'; export declare class CacheControl { readonly enabled: boolean; private directives; name: string; protected constructor(enabled?: boolean, directives?: Record<string, boolean | CacheAge | undefined>); static disabled: () => CacheControl; static OneSecond: () => CacheControl; static fiveSeconds: () => CacheControl; static tenSeconds: () => CacheControl; static thirtySeconds: () => CacheControl; static sixtySeconds: () => CacheControl; static custom: (maxAge?: CacheAge, staleWhileRevalidate?: CacheAge) => CacheControl; readonly maxAge: (ca?: CacheAge) => this; readonly sharedMaxAge: (ca?: CacheAge) => this; readonly noCache: (a?: boolean) => this; readonly mustRevalidate: (a?: boolean) => this; readonly private: (a?: boolean) => this; readonly public: (a?: boolean) => this; readonly immutable: (a?: boolean) => this; readonly staleWhileRevalidate: (ca?: CacheAge) => this; value: () => string; toString(): string; }