import type { ParsedModule } from '../parsers/types'; /** * Interface for cache entry metadata */ export interface CacheEntry { hash: string; timestamp: number; module: ParsedModule; version?: string; } /** * Interface for cache statistics */ export interface CacheStats { hits: number; misses: number; invalidations: number; } /** * ModuleCache provides caching for parsed AST modules with file change detection * Invalidates cache entries when source files are modified */ export declare class ModuleCache { private cache; private fileHashes; private stats; private cacheDir; private enabled; private readonly CURRENT_VERSION; constructor(cacheDir?: string); /** * Get a cached module if it exists and is still valid * @param filePath - Absolute path to the file * @returns Cached ParsedModule or null if not found or invalid */ get(filePath: string): Promise; /** * Store a parsed module in cache * @param filePath - Absolute path to the file * @param module - Parsed module to cache */ set(filePath: string, module: ParsedModule): Promise; /** * Clear all cache entries (both in-memory and persistent) */ clear(): Promise; /** * Get cache statistics */ getStats(): CacheStats; /** * Reset statistics */ resetStats(): void; /** * Compute hash of file contents * @param filePath - Path to the file * @returns SHA256 hash of file contents */ private getFileHash; /** * Save cache entry to disk * @param filePath - Path to the source file * @param entry - Cache entry to save */ private saveToDisk; /** * Load cache entry from disk * @param filePath - Path to the source file * @returns Cache entry or null if not found */ private loadFromDisk; /** * Remove cache entry from disk * @param filePath - Path to the source file */ private removeFromDisk; /** * Generate a safe cache key from file path * @param filePath - Path to the source file * @returns Safe cache key */ private getCacheKey; } //# sourceMappingURL=ModuleCache.d.ts.map