/** * @fileoverview LRU Cache for compiled Minimatch patterns * * This module provides a simple LRU (Least Recently Used) cache for Minimatch * instances. Caching compiled patterns significantly improves performance * when the same pattern is used multiple times with the minimatch() function. * * The cache stores compiled Minimatch instances keyed by a combination of * the pattern string and relevant options that affect compilation. * * @author 686f6c61 * @see https://github.com/686f6c61/minimatch-fast * @license MIT */ import type { MinimatchOptions } from './types.js'; import { Minimatch } from './minimatch-class.js'; /** * Get a cached Minimatch instance or create a new one. * Implements LRU eviction when cache is full. * * @param pattern - The glob pattern * @param options - Minimatch options * @returns A Minimatch instance (cached or new) */ export declare function getOrCreateMatcher(pattern: string, options: MinimatchOptions): Minimatch; /** * Clear the pattern cache. * Useful for testing or when memory pressure is high. */ export declare function clearCache(): void; /** * Get the current cache size. * Useful for monitoring and testing. */ export declare function getCacheSize(): number; //# sourceMappingURL=cache.d.ts.map