import { ICache } from '@polygonlabs/servercore'; import { ClusterOptions } from 'ioredis'; interface RedisClusterNode { host: string; port: number; } interface RedisClientOptions { host?: string; port?: number; password?: string; db?: number; keyPrefix?: string; maxRetriesPerRequest?: number; lazyConnect?: boolean; cluster?: { nodes: RedisClusterNode[]; options?: ClusterOptions; }; } declare class RedisClient implements ICache { private readonly client; private isConnected; constructor(options?: RedisClientOptions); connect(): Promise; disconnect(): Promise; get(key: string): Promise; set(key: string, value: T, ttlSeconds?: number): Promise; delete(key: string): Promise; exists(key: string): Promise; clear(pattern?: string): Promise; expire(key: string, ttlSeconds: number): Promise; ttl(key: string): Promise; keys(pattern?: string): Promise; hset(key: string, field: string, value: T): Promise; hget(key: string, field: string): Promise; hgetall(key: string): Promise>; hdel(key: string, ...fields: string[]): Promise; hexists(key: string, field: string): Promise; hkeys(key: string): Promise; hlen(key: string): Promise; hmset(key: string, hash: Record): Promise; hmget(key: string, ...fields: string[]): Promise<(T | null)[]>; } export { RedisClient, type RedisClientOptions, type RedisClusterNode };