import { DynamicModule, MiddlewareConsumer, NestModule } from '@nestjs/common'; import { CacheStore, CacheStoreFactory } from '@nestjs/common/cache/interfaces/cache-manager.interface'; import { RedisOptions } from 'ioredis'; import { ModuleAsyncOptions } from '../utils'; export type CacheType = 'redis' | 'filesystem' | 'memory' | 'custom'; export type CacheEvictionStrategy = 'LRU' | 'LFU' | 'FIFO'; export type CacheChangeStrategy = 'expire-all' | 'expire-related' | 'none'; export interface CacheModuleOptions { type?: CacheType; prefix?: string; ttl?: number; maxItems?: number; enabled?: boolean; cleanStart?: boolean; evictionStrategy?: CacheEvictionStrategy; evictionDeferred?: boolean; changeStrategy?: CacheChangeStrategy; changeDeferred?: boolean; redis?: RedisOptions; filesystem?: { rootDir?: string; subdirsEnabled?: boolean; maxSize?: number; }; store?: string | CacheStoreFactory | CacheStore; isCacheableValue?: (value: any) => boolean; options?: Record; } export declare class CacheModule implements NestModule { static forRoot(options?: CacheModuleOptions): DynamicModule; static forRootAsync(options: ModuleAsyncOptions): DynamicModule; static createModule(providers?: any[], imports?: any[]): DynamicModule; private static configureCacheModule; configure(consumer: MiddlewareConsumer): any; }