#TypeError: cacheManager.caching is not a function

2 messages · Page 1 of 1 (latest)

molten crest
#

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!

drifting phoenix
#

I'm experiencing the same issue. This issue is happening with the createCacheManager function, which seems to have been fixed in the latest code. However, it doesn't seem to have been released yet.