nestjs / nest

A progressive Node.js framework for building efficient, scalable, and enterprise-grade server-side applications with TypeScript/JavaScript 🚀
https://nestjs.com
MIT License
66.91k stars 7.55k forks source link

Cache Module doesn't accept store object and uses memory caching instead #10590

Closed mciuchitu closed 1 year ago

mciuchitu commented 1 year ago

Is there an existing issue for this?

Current behavior

When you pass store object to CacheModule, store is ignored and in-memory cache is used instead.

Minimum reproduction code

https://github.com/Leichtwind/nestjs-typescript-starter-9kbyw9

Steps to reproduce

  1. npm ci
  2. npm start
  3. curl localhost:3000
  4. Response is Hello World! instead of Cached value
  5. There are no messages Trying to get cache or Trying to set cache in console

Expected behavior

CacheModule uses passed store object

Package

Other package

No response

NestJS version

9.2.0

Packages versions

[Nest Platform Information]
platform-express version : 9.2.0
schematics version       : 9.0.3
testing version          : 9.2.0
common version           : 9.2.0
core version             : 9.2.0
cli version              : 9.1.5

Node.js version

No response

In which operating systems have you tested?

Other

No response

kamilmysliwiec commented 1 year ago

Let's track this here https://github.com/nestjs/nest/pull/10591