import type { PathSpec } from '../../types.ts'; export interface FileCache { get(key: string): Promise; set(key: string, data: Uint8Array, options?: { fingerprint?: string | null; ttl?: number | null; }): Promise; add(key: string, data: Uint8Array, options?: { fingerprint?: string | null; ttl?: number | null; }): Promise; remove(key: string): Promise; evictPrefix(prefix: string): Promise; /** * Drop the given keys, synchronously. * * The load-time counterpart to {@link FileCache.remove}: `fromState` * is sync, so it cannot await a per-path removal — and a fire-and- * forget `void remove(...)` would let a read issued right after load * be served the very snapshot bytes the caller asked to bypass (and * would surface a rejection as an unhandled one). Stores whose state * cannot be mutated synchronously (redis) implement this as a * documented no-op. Mirrors Python `FileCacheMixin.evict_paths`. */ evictPaths(paths: Iterable): void; exists(key: string | PathSpec): Promise; isFresh(key: string, remoteFingerprint: string): Promise; clear(): Promise; multiGet(keys: readonly string[]): Promise<(Uint8Array | null)[]>; readonly cacheSize: number | null; readonly cacheEntries?: number | null; readonly cacheLimit: number; maxDrainBytes: number | null; readonly drainTasks?: Map>; } /** * Max bytes a background drain may buffer to fill the cache. * * null (the default) derives the budget from `cacheLimit`. An explicit * value limits speculative background reads further and may not exceed * the cache's intended capacity. Mirrors Python `drain_budget`. */ export declare function drainBudget(cache: FileCache): number; export declare function validateMaxDrainBytes(cacheLimit: number, maxDrainBytes: number | null): void; //# sourceMappingURL=mixin.d.ts.map