UNPKG

@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

14 lines (13 loc) 559 B
import { DynamicModule, OnModuleInit } from "@nestjs/common"; import { Cache } from "cache-manager"; import { CacheableConfiguration } from "./cacheable.interfaces"; export declare class CacheableModule implements OnModuleInit { private readonly config; constructor(cacheManager: Cache, config: CacheableConfiguration); onModuleInit(): void; static forRootAsync(options: { imports: any[]; useFactory: (...args: any[]) => Promise<CacheableConfiguration> | CacheableConfiguration; inject: any[]; }): DynamicModule; }