import Redis from './redis.js'; import Config from './config.js'; import ServiceInterface from './interface.js'; import type { Redis as RedisClient } from 'ioredis'; export declare class Store { getInstance(): unknown; has(...args: unknown[]): Promise; get(...args: unknown[]): Promise; set(...args: unknown[]): Promise; del(...args: unknown[]): Promise; flush(): Promise; tags(): unknown; } export declare class NullStore extends Store { constructor(...args: unknown[]); namespace(): this; tags(): this; } export declare class RedisNamespaceStore extends Store { prefix: string; namespace: string; redis: RedisClient; constructor(prefix: string, namespace: string, redis: RedisClient); getInstance(): RedisClient; has(key: string): Promise; key(key: string): string; get(key: string): Promise; del(key: string): Promise; set(key: string, value: unknown, minutes?: number, mutex?: string): Promise; flush(): Promise; } export declare class RedisStore extends Store { prefix: string; namespaceHandler: Record; redis: RedisClient; constructor(prefix: string, redis?: RedisClient | null); getInstance(): RedisClient; namespace(namespace: string): RedisNamespaceStore; has(key: string): Promise; key(key: string): string; get(key: string): Promise; del(key: string): Promise; set(key: string, value: unknown, minutes?: number, mutex?: string): Promise; flush(): Promise<'OK'>; } interface CacheConfig { prefix?: string; driver?: string; } declare class Cache extends ServiceInterface { config: CacheConfig; prefix: string; driver: string | undefined; store: Store | null; static dependencies: (typeof Config | typeof Redis)[]; constructor(config: Config); setStore(store: Store): this; getStore(): Store; setPrefix(prefix: string): void; getPrefix(): string; namespace(...args: [namespace: string]): NullStore | RedisNamespaceStore; has(key: string): Promise; get(key: string): Promise; set(...args: unknown[]): Promise; del(...args: unknown[]): Promise; flush(): Promise; } export default Cache;