![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
cache-manager-redis-yet
Advanced tools
The cache-manager-redis-yet package is a Redis store for the cache-manager module, which allows you to use Redis as a caching layer in your Node.js applications. It provides functionalities for setting, getting, and managing cache entries in a Redis database.
Setting a Cache Value
This feature allows you to set a value in the Redis cache with a specified time-to-live (TTL). The code sample demonstrates how to set up the cache manager with the Redis store and set a cache value.
const cacheManager = require('cache-manager');
const redisStore = require('cache-manager-redis-yet');
const cache = cacheManager.caching({
store: redisStore,
host: 'localhost',
port: 6379,
ttl: 600
});
cache.set('foo', 'bar', { ttl: 10 }, (err) => {
if (err) throw err;
console.log('Value set');
});
Getting a Cache Value
This feature allows you to retrieve a value from the Redis cache. The code sample shows how to get a previously set cache value.
cache.get('foo', (err, result) => {
if (err) throw err;
console.log(result); // 'bar'
});
Deleting a Cache Value
This feature allows you to delete a value from the Redis cache. The code sample demonstrates how to delete a cache entry.
cache.del('foo', (err) => {
if (err) throw err;
console.log('Value deleted');
});
Wrapping a Function
This feature allows you to wrap a function so that its result is cached. The code sample demonstrates how to wrap a function that simulates a long-running operation.
cache.wrap('foo', (cb) => {
// Simulate a long-running operation
setTimeout(() => {
cb(null, 'bar');
}, 2000);
}, (err, result) => {
if (err) throw err;
console.log(result); // 'bar'
});
cache-manager-redis-store is another Redis store for the cache-manager module. It provides similar functionalities for setting, getting, and managing cache entries in a Redis database. Compared to cache-manager-redis-yet, it is more widely used and has more community support.
node-cache-manager is a multi-store cache manager that supports various stores, including Redis. It provides a more flexible and extensible caching solution compared to cache-manager-redis-yet, allowing you to use different caching backends.
redis is a low-level Redis client for Node.js. While it does not provide the high-level caching functionalities of cache-manager-redis-yet, it offers more control and flexibility for interacting with Redis directly.
Redis cache store for node-cache-manager.
pnpm install cache-manager-redis-yet
Licensed under the MIT license.
Fork from https://github.com/dabroek/node-cache-manager-redis-store
FAQs
Redis store for node-cache-manager updated
The npm package cache-manager-redis-yet receives a total of 0 weekly downloads. As such, cache-manager-redis-yet popularity was classified as not popular.
We found that cache-manager-redis-yet demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.