Hi all 👋
I’m implementing Redis caching in a NestJS application.
I run Redis using Docker (basic image, tested PING works).
I want to use caching for /me endpoint (to store user profile) but plan to extend it for more global usage.
he setup:
- Using @nestjs/cache-manager with cache-manager-redis-store@2.x.
- Redis is up, logs from Nest show Cache SET works (my custom logger prints), but nothing gets stored.
- When I get the same key, it always returns undefined.
What I’ve tested:
-
I manually connected to Redis server from host, created key-value (SET foo bar) and it works.
But from my NestJS app: -
calling cacheManager.set("somekey", "someval") prints logs from my service
-
calling cacheManager.get("somekey") immediately after returns undefined
-
Also verified with redis-cli KEYS * or GET somekey — key is not stored at all.