/** * LRU token cache for parsed markdown tokens. * * Extracted from Claude Code's Markdown.tsx. marked.lexer is the hot cost on * virtual-scroll remounts (~3ms per message). useMemo doesn't survive * unmount->remount, so scrolling back to a previously-visible message * re-parses. Messages are immutable in history; same content -> same tokens. * Keyed by hash to avoid retaining full content strings. */ export declare class LRUTokenCache { private readonly maxSize; private readonly cache; constructor(maxSize?: number); /** * Get a cached value by content string, promoting it to MRU position. * Returns undefined on miss. */ get(content: string): T | undefined; /** * Store a value keyed by content string. Evicts LRU entry if at capacity. */ set(content: string, value: T): void; /** Number of cached entries. */ get size(): number; /** Remove all cached entries. */ clear(): void; } //# sourceMappingURL=token-cache.d.ts.map