UNPKG

@squareboat/nest-cache

Version:

The cache package for your NestJS Applications

10 lines (9 loc) 402 B
export interface CacheDriver { get(key: string): Promise<any>; set(key: string, value: Record<string, any> | string, 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>; getClient<T>(): T; }