import type { DocStatus } from "./volume.js"; export interface CachedEntry { content: string | Uint8Array; status: DocStatus; } export interface SessionCacheOptions { /** * Lifetime of cache entries in milliseconds. * undefined → 150_000 (2.5 min, multi-writer default) * null → never expires (single-writer max speed; only LRU evicts) * 0 → no cache (every get returns null after a tick) * N>0 → expire after N ms * * Rationale: TTL is only useful when external writers exist. The default * is conservative for the multi-writer case. Single-writer apps should * pass `null` for max speed. */ ttlMs?: number | null; maxBytes?: number; now?: () => number; } export declare class SessionCache { private entries; private currentBytes; private readonly ttlMs; private readonly maxBytes; private readonly now; constructor(opts?: SessionCacheOptions); get(path: string): CachedEntry | null; set(path: string, content: string | Uint8Array, status: DocStatus): void; delete(path: string): void; clear(): void; size(): number; totalBytes(): number; } //# sourceMappingURL=session-cache.d.ts.map