UNPKG

@bolttech/server-side-next

Version:

This library was generated with [Nx](https://nx.dev).

17 lines (16 loc) 661 B
import Redis from 'ioredis'; import { ConfigServiceInterface } from '../../../modules/config/interfaces'; declare type RedisValue = string | Record<string, unknown> | null; export declare class RedisService { private readonly configService; redisClient: Redis; constructor(configService: ConfigServiceInterface); get(key: string): Promise<RedisValue>; mget(keys: string[]): Promise<RedisValue[]>; hget(hash: string, field: string): Promise<string | null>; hgetall(hash: string): Promise<{ [key: string]: string; } | null>; set(key: string, data: RedisValue, ttl?: number): Promise<void>; } export {};