export declare const DEFAULT_PUBLIC_CACHE_CONTROL = "public, max-age=600, stale-while-revalidate=604800, stale-if-error=3600"; export declare const DEFAULT_SSR_CACHE_CONTROL = "public, max-age=600, stale-while-revalidate=604800, stale-if-error=3600"; export declare const DEFAULT_SSR_CDN_CACHE_CONTROL = "public, max-age=600, stale-while-revalidate=604800, stale-if-error=3600"; export declare const DEFAULT_SSR_NETLIFY_CDN_CACHE_CONTROL = "public, max-age=600, stale-while-revalidate=604800, stale-if-error=3600"; export declare const DEFAULT_SSR_CACHE_HEADERS: { readonly "cache-control": "public, max-age=600, stale-while-revalidate=604800, stale-if-error=3600"; readonly "cdn-cache-control": "public, max-age=600, stale-while-revalidate=604800, stale-if-error=3600"; readonly "netlify-cdn-cache-control": "public, max-age=600, stale-while-revalidate=604800, stale-if-error=3600"; }; /** * Deployment-wide override for the SSR shell cache policy. * * The default (`DEFAULT_SSR_CACHE_HEADERS`) is deliberately aggressive: SSR * HTML and React Router `.data` are one impersonal public shell, so hosts that * purge their CDN on deploy get near-static page loads for free. Two situations * make that default wrong, and both are properties of the DEPLOYMENT, not of * the request: * * 1. The host does not purge its CDN on deploy, so a shipped build can keep * serving the previous shell for `max-age` + `stale-while-revalidate`. * 2. The app's loaders return mutable public data, so a `useRevalidator()` * after a mutation reads the browser's cached `.data` copy instead of * fresh loader output. * * This override is intentionally global and env-driven rather than a * per-route/per-request escape hatch. A response that varies by request is how * one visitor's payload ends up in another visitor's shared CDN entry; a value * fixed for the whole deployment cannot. Turning caching off does NOT make SSR * personalized — `requestForAnonymousSsr` still strips cookies before render. * * Accepted values (case-insensitive): * unset | "on" | "default" | "true" | "1" → the default policy, unchanged * "off" | "false" | "0" | "none" | "no-store" | "disabled" → no caching * "" | "s" | "m" | "h" → public caching with that freshness */ export declare const SSR_CACHE_ENV_VAR = "AGENT_NATIVE_SSR_CACHE"; export declare const DISABLED_SSR_CACHE_CONTROL = "no-store"; export declare const DISABLED_SSR_CACHE_HEADERS: { readonly "cache-control": "no-store"; readonly "cdn-cache-control": "no-store"; readonly "netlify-cdn-cache-control": "no-store"; }; export type SsrCachePolicy = { kind: "default"; } | { kind: "disabled"; } | { kind: "maxAge"; seconds: number; }; export type SsrCacheHeaders = Record<"cache-control" | "cdn-cache-control" | "netlify-cdn-cache-control", string>; export declare function parseSsrCacheSetting(raw: string | undefined | null): SsrCachePolicy; export declare function ssrCacheHeadersForPolicy(policy: SsrCachePolicy): SsrCacheHeaders; /** * Resolve the SSR cache headers for this deployment. Reads * `AGENT_NATIVE_SSR_CACHE` and memoizes per distinct value so the hot SSR path * does not re-parse on every response. The result is frozen and shared by every * response — copy it before mutating. */ export declare function resolveSsrCacheHeaders(env?: Record): Readonly; export declare function isSsrCacheEnabled(env?: Record): boolean; export declare const DEFAULT_SPECULATION_RULES_PATH = "/_agent-native/speculation-rules.json"; export declare const DEFAULT_SPECULATION_RULES_HEADER = "\"/_agent-native/speculation-rules.json\""; export declare const EMPTY_SPECULATION_RULES: { readonly prefetch: readonly []; readonly prerender: readonly []; }; //# sourceMappingURL=cache-control.d.ts.map