import type { RedisClientType } from '@redis/client'; import Base from '../../modules/Base.ts'; import type { IApp } from '../../server.ts'; declare class Cache extends Base { #private; whenReady: Promise; redisClient: RedisClientType; redisNamespace: string; promiseMapping: Map; constructor(app: IApp); /** * As framework support namespaces all key for cache go through this function * Function return new key with added namespace * @param key key to add namespace */ getKeyWithNameSpace(key: string): string; /** * Get value from cache. Set and get if not eists * @param key key to check * @param onNotFound callback that will be executed if value not found on cahce * @param storeTime how long we should store value on cache */ getSetValue(keyValue: string, onNotFound: () => Promise, storeTime?: number): Promise; /** * Remove key from cache * @param key key to remove */ removeKey(keyValue: string): Promise; static get loggerGroup(): string; } export default Cache;