export default interface CacheRepositoryInterface { /** * Get cache item */ get(key: string): Promise; /** * Get multiple cache items by multiple keys */ getMany(keys: string[]): Promise; /** * Get cache item and delete it from cache immediately */ pull(key: string): Promise; /** * Put data into cache for certain time */ put(key: string, data: any, ttlInSeconds?: number): Promise; /** * Put multiple key-value pairs into cache for certain time */ putMany(data: { key: string; value: any; }[], ttlInSeconds?: number): Promise; /** * Put data into cache forever */ putForever(key: string, data: any): Promise; /** * Check whether the key exists in the cache */ has(key: string): Promise; /** * Get cache keys */ keys(regex?: RegExp): Promise; /** * Delete item from the cache */ delete(key: string): Promise; /** * Delete items from the cache */ deleteMany(keys: string[]): Promise; /** * Clear the entire cache */ flush(): Promise; /** * Get all cache keys with expiration timestamps */ getAllCacheKeysWithTimestamps(): Promise<{ key: string; expiresAtTimestamp: number; }[]>; }