cache-panda
Version:
🐼 A flexible, decorator-based smart cache module for NestJS with TTL, key prefixing, and conditional caching based on method execution time.
16 lines • 707 B
TypeScript
import { Cache } from "cache-manager";
export declare class CachePandaService {
private readonly cacheManager;
private readonly logger;
private static instance;
constructor(cacheManager: Cache);
static getInstance(): CachePandaService;
getCache<T = any>(key: string): Promise<T | undefined>;
setCache(key: string, value: string, ttl?: number): Promise<void>;
deleteCache(key: string): Promise<void>;
clearCache(): Promise<void>;
deleteCacheByKeys(keys: string[]): Promise<void>;
getKeysByKeyPattern(pattern: string): Promise<string[]>;
deleteCacheByKeyPattern(pattern: string): Promise<void>;
}
//# sourceMappingURL=cache-panda.service.d.ts.map