UNPKG

@squareboat/nest-cache

Version:

The cache package for your NestJS Applications

15 lines (14 loc) 601 B
import { CacheDriver, RedisDriverOption } from "../interfaces"; export declare class RedisDriver implements CacheDriver { private options; private client; constructor(options: RedisDriverOption); get(key: string): Promise<any>; set(key: string, value: string | Record<string, any>, ttlInSec?: number): Promise<void>; has(key: string): Promise<boolean>; remember<T>(key: string, cb: Function, ttlInSec: number): Promise<T>; rememberForever<T>(key: string, cb: Function): Promise<T>; forget(key: string): Promise<void>; private storeKey; getClient<T>(): T; }