Official Docs links:
https://docs.nestjs.com/techniques/caching
https://docs.nestjs.com/techniques/caching#different-stores
Also add types
npm install --save-dev @types/cache-manager
npm run start:dev
In CLI, redis client redis-cli
check by
GET foo2
It is already present. Pleas see "Redis Cache" section after "Installing Dependencies" at https://sohelahmed.site/blog/redis-cache-in-nest-js