GithubHelp home page GithubHelp logo

Comments (4)

honguyenhaituan avatar honguyenhaituan commented on May 4, 2024 1

Hi @Djunnni,

There exists a way to set up multi-caching. I saw it in the test case:

CacheModule.register([
{
store: 'memory',
max: 100,
ttl: 50,
},
{
store: redisStore,
host: 'localhost',
port: 6379,
db: 0,
ttl: 50,
},
]),

But I think it is very hard to read CacheModuleOptions to know there is an existing way config like that.

export type CacheModuleOptions<
StoreConfig extends Record<any, any> = Record<string, any>,
> =
// Store-specific configuration takes precedence over cache module options due
// to how `createCacheManager` is implemented.
CacheManagerOptions &
StoreConfig & {
/**
* If "true', register `CacheModule` as a global module.
*/
isGlobal?: boolean;
};

So I suggest changing the type of CacheModuleOptions so everyone can easily set up when using the lib.

from cache-manager.

kamilmysliwiec avatar kamilmysliwiec commented on May 4, 2024

Would you like to create a PR for this issue?

from cache-manager.

adworacz avatar adworacz commented on May 4, 2024

I'm open to doing so. I'm not sure when I can invest the time just yet, got a few critical projects that need to see completion in the coming month.

from cache-manager.

Djunnni avatar Djunnni commented on May 4, 2024

hello there 👋🏻
let you know more situation about this problem. if i can understand that. i want to try :)

from cache-manager.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.