Closed rcmarc closed 2 years ago
In the docs, it says that a redis store on the CacheModule must be set up like this:
@Module({ imports: [ CacheModule.register<RedisClientOptions>({ store: redisStore, // Store-specific configuration: socket: { host: 'localhost', port: 6379, }, isGlobal: true }), ], controllers: [AppController], })
but when the service is manually injected:
constructor(@Inject(CACHE_MANAGER) private cacheManager: Cache) {}
it gives an instance of the In Memory Cache
I think this is a documentation issue because when i set up the CacheModule in this way without the socket object:
@Module({ imports: [ CacheModule.register({ store: redisStore, host: 'localhost', port: 6379, isGlobal: true }), ], controllers: [AppController], })
it works as expected.
This issue was reproduced with this environment:
Please, use our Discord channel (support) for such questions. We are using GitHub to track bugs, feature requests, and potential improvements.
In the docs, it says that a redis store on the CacheModule must be set up like this:
but when the service is manually injected:
it gives an instance of the In Memory Cache
I think this is a documentation issue because when i set up the CacheModule in this way without the socket object:
it works as expected.
This issue was reproduced with this environment: