export interface CacheOptions { url?: string; prefix?: string; defaultTTL?: number; memoryCache?: boolean; memoryTTL?: number; memoryMaxSize?: number; enableStampedeProtection?: boolean; stampedeTTL?: number; retryAttempts?: number; retryDelay?: number; } export interface SetOptions { ttl?: number; tags?: string[]; } export interface CacheMetadata { key: string; ttl?: number; tags?: string[]; } export interface CacheStats { hits: number; misses: number; keys: number; hitRate: number; } export interface WrapOptions { ttl?: number; tags?: string[]; } export type AsyncFunction = () => Promise; export interface ICacheAdapter { get(key: string): Promise; set(key: string, value: T, ttl?: number): Promise; del(key: string): Promise; clear(): Promise; exists(key: string): Promise; getKeys(pattern: string): Promise; invalidateTag(tag: string): Promise; addToTag(tag: string, key: string): Promise; getKeysByTag(tag: string): Promise; } export interface ICacheService { get(key: string): Promise; set(key: string, value: T, options?: SetOptions): Promise; del(key: string): Promise; clear(): Promise; exists(key: string): Promise; wrap(key: string, fn: AsyncFunction, options?: WrapOptions): Promise; invalidateTag(tag: string): Promise; key(...args: (string | number | Record)[]): string; stats(): CacheStats; resetStats(): void; } export interface ModuleOptions extends CacheOptions {}