We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug Can't set value when use redis. Tried both cache-manager-ioredis-yet and cache-manager-redis-yet. Error message:
store.set is not a function at Object.set (/node_modules/cache-manager/dist/caching.js:48:45)
redis_version:6.0.20 "cache-manager": "^5.2.3", "cache-manager-ioredis-yet": "^1.2.2", "cache-manager-redis-yet": "^4.1.2",
How To Reproduce (best to provide workable code or tests!)
const cacheManager = require('cache-manager'); const { redisStore } = require('cache-manager-ioredis-yet'); const redisCache = await cacheManager.caching({ store: await redisStore({ host: 'localhost', // default value username: "default", port: 6379, // default value password: 'XXXX', db: 0, ttl: 60 * 1000 /*milliseconds*/ }), }); redisCache.set('foo', 'bar', 5 * 1000)
The text was updated successfully, but these errors were encountered:
Having same issue with Mongoose, any update ?
Sorry, something went wrong.
Find the source of issue: Codes should be like this when use custom stores
/** * @CacheManager * @Redis */ const cacheManager = require('cache-manager'); const { redisStore } = require('cache-manager-ioredis-yet'); const store = await redisStore({ host: 'localhost', // default value username: "default", port: 6379, // default value password: 'XXXX', db: 0, ttl: 60 * 1000 /*milliseconds*/ }) const redisCache = await cacheManager.caching(store);
/** * @CacheManager * @FS */ const cacheManager = require('cache-manager'); const FsStore = require('cache-manager-fs'); const store = FsStore.create({ path: 'diskcache', //path for cached files ttl: 60 * 60, //time to life in seconds maxsize: 1000 * 1000 * 1000, // max size in bytes on disk zip: true, //zip files to save diskspace (default: false) preventfill: true }) const diskCache = await cacheManager.caching(store); await diskCache.set('key', 'value'); console.log(await diskCache.get('key')); //"value"
No branches or pull requests
Describe the bug
Can't set value when use redis.
Tried both cache-manager-ioredis-yet and cache-manager-redis-yet.
Error message:
How To Reproduce (best to provide workable code or tests!)
The text was updated successfully, but these errors were encountered: