/** * Regex Cache Utility * Provides caching for compiled regex patterns to improve performance * Backward compatible optimization */ /** * Thread-safe regex pattern cache */ export declare class RegexCache { private static cache; /** * Get or create a compiled regex pattern * @param pattern - The regex pattern string * @param flags - Optional regex flags * @returns Compiled RegExp instance */ static getPattern(pattern: string, flags?: string): RegExp; /** * Clear the entire cache */ static clear(): void; /** * Get cache statistics * @returns Cache size and statistics */ static getStats(): { size: number; keys: string[]; }; /** * Check if a pattern is cached * @param pattern - The regex pattern string * @param flags - Optional regex flags * @returns True if pattern is cached */ static hasPattern(pattern: string, flags?: string): boolean; /** * Pre-cache common patterns for better performance */ static precacheCommonPatterns(): void; } //# sourceMappingURL=regex-cache.d.ts.map