UNPKG

@sophons/redis

Version:

🏡 Encapsulate common business methods for Redis

20 lines (19 loc) 658 B
import { Redis, Cluster, MutexOptions, CacheOptions, HashCacheOptions } from './common'; /** * Decorator that performs mutex logic */ export declare const mutexDecorator: (client: Redis | Cluster, options: MutexOptions) => { with: (...args: any[]) => Promise<any>; }; /** * Decorator that performs cache logic */ export declare const cacheDecorator: (client: Redis | Cluster, options: CacheOptions) => { with: (...args: any[]) => Promise<any>; }; /** * Decorator that performs cache(hash) logic */ export declare const hashCacheDecorator: (client: Redis | Cluster, options: HashCacheOptions) => { with: (...args: any[]) => Promise<any>; };