I am currently using cache manager module from NestJS and I was wondering why I can't get the NodeRedis client like this :
constructor(
@Inject(CACHE_MANAGER) private cacheManager: Cache,
) {
cacheManager.store.getClient();
}
I am getting this error :
ERROR in [...].controller.ts:24:24
TS2339: Property 'getClient' does not exist on type 'Store'.
22 | @Inject(CACHE_MANAGER) private cacheManager: Cache,
23 | ) {
> 24 | cacheManager.store.getClient();
| ^^^^^^^^^
25 | }
I did configured the cache-manager-redis-store when I registered the CacheModule then I supposed I could get the client.