Hey,
I want to use @nestjs/cache-manager. But unfortunately, I receive this error:
TypeError: cacheManager.caching is not a function
@Module({
imports: [
// Other stuff
// Cache module
CacheModule.registerAsync({
imports: [ConfigModule],
useFactory: (configService: ConfigService) => ({
ttl: configService.get<number>('cache.ttl'),
}),
inject: [ConfigService],
}),
// Config module
ConfigModule.forRoot({
load: [configuration],
isGlobal: true,
envFilePath: ['.env.development', '.env.production'],
}),
// Other stuff
],
})
export class AppModule {}
"dependencies": {
"@nestjs/cache-manager": "^2.3.0",
"cache-manager": "^6.3.1",
},
Thank you for your help!