@nhan2804/nestjs-cacheable
Version:
@nestjs/cacheable is a flexible caching library for NestJS that leverages Redis for efficient and scalable storage. With support for function-level caching through easy-to-use decorators, it allows developers to seamlessly enhance performance while mainta
12 lines (11 loc) • 317 B
TypeScript
export type CacheKeyBuilder = (...args: any[]) => string;
export interface CacheableConfiguration {
ttl?: number;
refreshThreshold?: number;
isDev?: boolean;
}
export interface CacheableOptions extends CacheableConfiguration {
key?: string | CacheKeyBuilder;
prefix?: string;
type?: string;
}