import type { HostResolverCache } from "./cache"; export interface CacheApiHostCacheOptions { upstream: HostResolverCache; cacheTtlSeconds?: number; negativeCacheTtlSeconds?: number; namespace?: string; cache?: Cache; waitUntil?: (promise: Promise) => void; cacheReadTimeoutMs?: number; cacheWriteTimeoutMs?: number; } /** * Wraps an upstream `HostResolverCache` with a Cloudflare Cache-API layer. * On cache miss, the upstream is queried and the result written back into * the Cache API for subsequent reads in the same colo. * * Invalidation is the caller's responsibility — typically the control plane * issues `cache.delete(syntheticKey(...))` on every proxy_route mutation, * and each colo's cache expires on its own TTL otherwise. * * @deprecated Prefer `createCacheAdapterHostCache` with `createCloudflareCache` * from `@authhero/cloudflare-adapter`. The adapter-based wrapper supports * stale-while-revalidate, stale-if-error, and works with any `CacheAdapter` * (Cloudflare, Redis, in-memory, …). */ export declare function createCacheApiHostCache(options: CacheApiHostCacheOptions): HostResolverCache; export declare function buildCacheApiKey(namespace: string, host: string): Request;