/**
 * 🧠 Intelligent Caching System for AI-Debug
 *
 * Caches expensive operations and system information to improve performance
 * Uses smart invalidation and memory management
 */
import { EventEmitter } from 'events';
export interface CacheEntry<T> {
    value: T;
    timestamp: number;
    ttl: number;
    hits: number;
    lastAccess: number;
    size: number;
}
export interface CacheOptions {
    ttl?: number;
    maxSize?: number;
    maxEntries?: number;
    onEvict?: (key: string, value: any) => void;
}
export declare class IntelligentCache<T = any> extends EventEmitter {
    private cache;
    private options;
    private totalSize;
    constructor(options?: CacheOptions);
    /**
     * Get value from cache with automatic validation
     */
    get(key: string): T | null;
    /**
     * Set value in cache with intelligent eviction
     */
    set(key: string, value: T, options?: {
        ttl?: number;
        priority?: number;
    }): void;
    /**
     * Get or compute value with caching
     */
    getOrCompute(key: string, compute: () => Promise<T>, options?: {
        ttl?: number;
        priority?: number;
    }): Promise<T>;
    /**
     * Delete entry from cache
     */
    delete(key: string): boolean;
    /**
     * Clear all entries
     */
    clear(): void;
    /**
     * Get cache statistics
     */
    getStats(): {
        entries: number;
        totalSize: number;
        hitRate: number;
        averageAge: number;
        memoryUsage: string;
    };
    /**
     * Cleanup expired entries
     */
    private cleanup;
    /**
     * Evict least recently used entry
     */
    private evictLeastUsed;
    /**
     * Estimate memory size of value
     */
    private estimateSize;
}
/**
 * System Information Cache - Caches expensive system queries
 */
export declare class SystemInfoCache {
    private windowsCache;
    private processCache;
    private screenCache;
    /**
     * Cache window information
     */
    getWindowInfo(appName: string): Promise<any>;
    /**
     * Cache process information
     */
    getProcessInfo(pid: number): Promise<any>;
    /**
     * Cache screen information
     */
    getScreenInfo(): Promise<any>;
    /**
     * Invalidate cache for specific app when windows change
     */
    invalidateWindowCache(appName?: string): void;
    private discoverWindows;
    private queryProcessInfo;
    private queryScreenInfo;
    /**
     * Get combined cache statistics
     */
    getStats(): any;
}
/**
 * Global system cache instance
 */
export declare const systemCache: SystemInfoCache;
/**
 * Performance-optimized file system cache
 */
export declare class FileSystemCache extends IntelligentCache<Buffer | string> {
    constructor();
    /**
     * Cache file contents with hash-based invalidation
     */
    getFileContents(filePath: string): Promise<string | null>;
}
/**
 * Global file system cache
 */
export declare const fileCache: FileSystemCache;
//# sourceMappingURL=intelligent-caching-system.d.ts.map