import { CacheProvider } from '../interfaces/cache-provider'; /** * Options for the tag invalidator */ export interface TagInvalidatorOptions { /** * Key prefix for tag sets */ tagPrefix?: string; /** * Whether to enable logging */ enableLogging?: boolean; /** * Log level */ logLevel?: 'debug' | 'info' | 'warn' | 'error'; } /** * Tag-based cache invalidator * Allows invalidating cache entries based on tags */ export declare class TagInvalidator { private provider; private options; private logger; /** * Creates a new TagInvalidator * @param provider Cache provider to invalidate * @param options Tag invalidator options */ constructor(provider: CacheProvider, options?: TagInvalidatorOptions); /** * Set a value in the cache with associated tags * @param key Cache key * @param value Value to cache * @param tags Tags to associate with the key * @param ttl Time-to-live in milliseconds (optional) * @returns Promise resolving to true if successful */ set(key: string, value: T, tags: string[], ttl?: number): Promise; /** * Invalidate all keys associated with a tag * @param tag Tag to invalidate * @returns Promise resolving to the number of invalidated keys */ invalidateByTag(tag: string): Promise; /** * Invalidate keys associated with multiple tags * @param tags Tags to invalidate * @param operator 'AND' requires keys to have all tags, 'OR' requires any tag * @returns Promise resolving to the number of invalidated keys */ invalidateByTags(tags: string[], operator?: 'AND' | 'OR'): Promise; /** * Associate a key with a tag * @param tag Tag to associate * @param key Cache key * @returns Promise resolving when completed */ private addKeyToTag; /** * Get all keys associated with a tag * @param tag Tag to get keys for * @returns Promise resolving to array of keys */ private getKeysByTag; /** * Get the cache key for a tag set * @param tag Tag name * @returns Cache key for the tag set */ private getTagKey; } //# sourceMappingURL=tag-invalidator.d.ts.map