export declare class CacheService { private readonly CACHE_COLLECTION_PREFIX; private readonly mdbMcpConnectionString; constructor(mdbMcpConnectionString?: string); /** * The core generic caching method. It attempts to retrieve data from the cache using a key. * If the data is not found or is expired, it executes the provided `operation` function, * stores the result back in the cache, and then returns it. * * @template T The type of data being cached. * @param key The unique key for this cache entry (e.g., a 'videoId' or a generated hash). * @param operation An async function that returns the fresh data (type T) to be cached on a miss. * @param ttlSeconds The Time-To-Live for this cache entry, in seconds. * @param collectionName A descriptive name for the MongoDB collection where this data will be stored (e.g., "video_details"). * @param params Optional: Parameters used to generate the hashed keys and stored in cache as params. * @param pathsToExclude Optional: An array of string paths (e.g., "snippet.thumbnails") to exclude from the cached data. * @returns A promise that resolves to the data, either from the cache or freshly generated. */ getOrSet(key: string, operation: () => Promise, ttlSeconds: number, collectionName: string, params?: object, pathsToExclude?: string[]): Promise; /** * A helper utility to create a consistent, unique hash key from a function's name and its arguments. * This is ideal for caching the results of complex queries (like video searches) where the * combination of all parameters determines the result. * * @param operationName A unique name for the operation being cached (e.g., "searchVideos"). * @param args An object containing all the arguments for the operation. * @returns A cryptographic SHA256 hash string to be used as a cache key. */ createOperationKey(operationName: string, args: object): string; }