-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] store.get is not a function #3
Comments
I think your problem is
You don't that line, and I wonder where did you get that line from? |
Without the await cacheStore.get() is |
i have fixed mine. CacheModule.registerAsync({
isGlobal: true,
useFactory: () => {
const options = {
store: sqliteStore,
name: 'cache',
path: `cache.db`,
};
return caching(options);
},
}), this worked for me. |
Unfortunately I still have the same problem in Strapi. I guess this code is only for Nestjs? |
I have not used strapi, so I have two questions:
In case it's standard cache-manager package then:
should give you
Is it part of some new standard I am not aware of? |
This is the complete code. const cacheCollectionSQLiteStore = cacheManager.caching({
store: sqliteStore,
options: {
serializer: 'json',
ttl: 60 * 60
}
});
const dataCache = await cacheCollectionSQLiteStore.get('key_here'); This is error received. What am I doing wrong? |
I think I figured out the issue. You are using |
cacheManager is default import from 'cache-manager'; |
I think that's the real problem, thanks for your good job. Blessings! |
This error is happend
Error image
Node 16.x
Strapi v4
The text was updated successfully, but these errors were encountered: