/** * A size-limited cache to prevent memory leaks in dynamic environments. * When the limit is reached, it evicts the oldest entry (FIFO). */ declare class LimitedCache { private map; private readonly limit; constructor(limit?: number); get(key: K): V | undefined; set(key: K, value: V): void; clear(): void; } export declare const pathCache: LimitedCache; export declare const regexCache: LimitedCache; export declare function getCachedPathSegments(path: string, parser: (p: string) => string[]): string[]; export declare function getCachedRegex(key: string, creator: () => RegExp): RegExp; export {}; //# sourceMappingURL=cache.d.ts.map