export declare const STREAMING_PAGE_HEADER = "x-absolute-stream"; /** Headers for a STREAMING html page response — `text/html` plus the streaming * marker so {@link withPageCacheHeaders} marks it `no-cache` (no ETag). */ export declare const streamingPageHeaders: (extra?: HeadersInit) => Headers; /** Options for {@link withPageCacheHeaders}. */ export type PageCacheOptions = { /** Opt a *streaming* page into the buffered-ETag path: buffer its whole * body before sending so it can carry a content-hash `ETag` and serve a * `304` on repeat visits. This trades streaming's fast first byte for the * revalidation saving, so only set it on pages whose output is static * enough that the 304 is worth losing the stream (e.g. a marketing page). * No effect on already-buffered pages — those are ETagged regardless. */ bufferStreamForEtag?: boolean; }; /** Apply the SPA cache policy to a page Response. HTML gets `no-cache` (+ a * content-hash `ETag` / `304` for buffered responses); non-HTML responses * (redirects, JSON, etc.) pass through untouched. Safe to call on every page * handler's final response. * * Streaming pages skip the ETag (their headers flush before the body renders) * unless the caller passes `bufferStreamForEtag`, which buffers the stream so * it can be hashed — see {@link PageCacheOptions}. */ export declare const withPageCacheHeaders: (response: Response, request?: Request, options?: PageCacheOptions) => Promise;