Closed mmuenker closed 6 months ago
If the "register" method options include a "useClass" property, the class will not be utilized to determine the cache manager's options.
I am not sure if this is an issue in this repository or in the @nestjs/core repository.
https://github.com/mmuenker/cache-options-are-not-resolved
During startup, the CacheModule.register function creates an instance of the CacheModuleOptionsLoader class, which is defined with useClass property.
2.2.1
10.3.2
18.18.2
$ yarn start [Nest] 665160 - 02/08/2024, 2:50:23 PM LOG [NestFactory] Starting Nest application... [Nest] 665160 - 02/08/2024, 2:50:23 PM LOG [InstanceLoader] CacheModule dependencies initialized +8ms [Nest] 665160 - 02/08/2024, 2:50:23 PM LOG [InstanceLoader] AppModule dependencies initialized +0ms [Nest] 665160 - 02/08/2024, 2:50:23 PM LOG [RoutesResolver] AppController {/}: +4ms [Nest] 665160 - 02/08/2024, 2:50:23 PM LOG [RouterExplorer] Mapped {/, GET} route +1ms [Nest] 665160 - 02/08/2024, 2:50:23 PM LOG [NestApplication] Nest application successfully started +1ms
Use registerAsync not register
registerAsync
register
Is there an existing issue for this?
Current behavior
If the "register" method options include a "useClass" property, the class will not be utilized to determine the cache manager's options.
I am not sure if this is an issue in this repository or in the @nestjs/core repository.
Minimum reproduction code
https://github.com/mmuenker/cache-options-are-not-resolved
Steps to reproduce
Expected behavior
During startup, the CacheModule.register function creates an instance of the CacheModuleOptionsLoader class, which is defined with useClass property.
Package version
2.2.1
NestJS version
10.3.2
Node.js version
18.18.2
In which operating systems have you tested?
Other