import type { CacheBackend, CacheReadOptions } from "./backend.js"; interface PendingRequest { key: string; resolve: (value: string | null) => void; reject: (error: Error) => void; /** See {@link CacheReadOptions}; forwarded to the flush that serves this key. */ onAuthority?: CacheReadOptions["onAuthority"]; } interface RequestCacheContext { cache: Map; pending: Map>; mutationVersions: Map; batchQueue: PendingRequest[]; batchTimer: ReturnType | null; } export declare function runWithCacheBatching(fn: () => Promise): Promise; export declare function getRequestCacheContext(): RequestCacheContext | undefined; export declare function getCachedWithBatching(backend: CacheBackend, key: string, options?: CacheReadOptions): Promise; export declare function setInRequestCache(key: string, value: string | null): void; export declare function getRequestCacheStats(): { hits: number; stored: number; } | null; export {}; //# sourceMappingURL=request-cache-batcher.d.ts.map