/** * On-disk TTL cache (SPEC §2). Entries live under ~/.cache/gaff-check/, * keyed by a hash of source + params. Each source declares its own TTL. * `--no-cache` disables reads and writes (useful in dev / e2e). */ /** Per-source TTLs in milliseconds (SPEC §2). */ export declare const TTL: { readonly nominatim: number; readonly planning: number; readonly ppr: number; readonly radon: number; readonly zoning: number; readonly flood: number; readonly cso_ber: number; readonly garda_crime: number; readonly cso_crime: number; }; export type SourceName = keyof typeof TTL; export declare function setCacheEnabled(on: boolean): void; /** Override the cache directory (tests only). */ export declare function setCacheDir(dir: string): void; /** * Return the cached value for (source, params) if fresh, otherwise call * `fetcher`, store the result, and return it. Cache failures never fail * the request — they degrade to a live fetch. */ export declare function cached(source: SourceName, params: unknown, fetcher: () => Promise): Promise;