
Security News
Django Joins curl in Pushing Back on AI Slop Security Reports
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
expeditious-engine-redis
Advanced tools
An in redis engine for expeditious. Cache entries are - you guessed it - stored in a redis instance.
You can use this module standalone or with expeditious which is the recommended approach since it simplifies interactions and allows you to easily switch cache engines.
const expeditious = require('expeditious');
// This will be passed to redis.createClient(options)
// https://www.npmjs.com/package/redis#rediscreateclient
const redisOptions = {
host: 'redis-server.acme.com',
port: 6379
};
const countries = expeditious({
// Use the expeditious memory engine
engine: require('expeditious-engine-redis')({redis: redisOptions}),
// Prefix all entries with 'countries'
namespace: 'countries',
// Auto parse json entries
objectMode: true,
// 1 hour timeout for entries
defaultTtl: (60 * 1000 * 60),
});
countries.set({
key: 'ireland',
value: {
population: '4.595 million',
capital: 'Dublin'
}
}, function (err) {
if (!err) {
console.error('failed to add "ireland" to the cache');
} else {
console.log('add "ireland" to the cache');
}
});
Each API function takes a callback function as the last parameter and it receives up to two arguments as per node.js convention, error err and an optional result, res.
Set a key (String) in the cache with a given (String) value. expire must be a Number greater than 0.
Get a specific item from the cache. Returns null if the entry is not found.
Delete a specific item from the cache. Callback receives only an error parameter.
List all keys that this engine instance contains for the given namespace. This can be expensive as per the reddit docs for KEYS.
Get the time left before key expires. Returns null as res if the entry is not found.
Flush all items from the engine instance in the given namespace.
FAQs
redis engine for expeditious caches
The npm package expeditious-engine-redis receives a total of 193 weekly downloads. As such, expeditious-engine-redis popularity was classified as not popular.
We found that expeditious-engine-redis demonstrated a not healthy version release cadence and project activity because the last version was released 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
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.