You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So that the models for each request will use a separate mongooseInstance with a separate cache. I want this so that when a request requests the same data twice the cache is used.
However with my current implementation the cache seems to be global across the created mongoose instances.
Is this behaviour possible and if not how could I extend cachegoose to add this functionality.
Thanks.
The text was updated successfully, but these errors were encountered:
Is it possible to create multiple
mongoose.Mongoose
instances and each of them to have their own cache.My Setup
type-graphql
backend withtypegoose
/mongoose
Code here
My Question
I am trying to have each GraphQL request create a separate mongoose instance with its own cache like this
See here
The idea is that I can pass my instance into
getModelForClass
like thisSee here.
So that the models for each request will use a separate mongooseInstance with a separate cache. I want this so that when a request requests the same data twice the cache is used.
However with my current implementation the cache seems to be global across the created mongoose instances.
Is this behaviour possible and if not how could I extend
cachegoose
to add this functionality.Thanks.
The text was updated successfully, but these errors were encountered: