Registry / database / expeditious-engine-redis

expeditious-engine-redis

JSON →
library0.1.2jsnpmunverified

A Redis storage engine for the expeditious caching library, version 0.1.2. It stores cache entries in a Redis instance, providing a scalable backend for Node.js caching needs. The package is part of the expeditious ecosystem, allowing easy switching between cache engines. It implements the expeditious engine interface with methods like set, get, del, ttl, flush, and keys. Requires Node >= 4.4 and the redis package. Compared to in-memory engines, it enables shared, persistent caching across multiple processes or servers. Development appears to be low activity (few releases) and is used in production but may not be actively maintained.

npm install expeditious-engine-redis
INSTALL
IMPORT
SIG · EXPEDITIOUS-ENGINE
E
expeditious-engine-redis
databasejavascriptv0.1.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

expeditious-engine-redis
const engineFactory = require('expeditious-engine-redis'); const engine = engineFactory({redis: {host: 'localhost', port: 6379}});
const engine = require('expeditious-engine-redis'); // without calling as a function
The module exports a factory function that takes options, not a constructor.
expeditious
const expeditious = require('expeditious');
import expeditious from 'expeditious'; // older Node.js versions without ESM
CommonJS only, no ESM support. Use require().
engineFactory
const engineFactory = require('expeditious-engine-redis');
const { engineFactory } = require('expeditious-engine-redis'); // not a named export
The module exports a single function as default, not as named export.

Setup and usage of expeditious with Redis engine: initialize engine, create cache instance, set and get a value.

const expeditious = require('expeditious'); const engineFactory = require('expeditious-engine-redis'); const cache = expeditious({ engine: engineFactory({redis: {host: 'localhost', port: 6379}}), namespace: 'myapp', objectMode: true, defaultTtl: 60000 // 1 minute }); cache.set({ key: 'user:1', value: { name: 'Alice' } }, (err) => { if (err) console.error('Set error', err); else cache.get({ key: 'user:1' }, (err, result) => { console.log(result); // { name: 'Alice' } }); });
Debug
Known issues
gotchaThe engine factory expects options.redis object (host, port, etc.) not a Redis client instance.
fix
Pass redis connection options as {redis: {host, port, ...}} or use redis.createClient options.
affects: >=0.0.0
deprecatedThe keys() method uses Redis KEYS which is O(N) and should not be used in production.
fix
Avoid using keys() method in production. Use SCAN if needed.
affects: >=0.0.0
breakingThe require() pattern changed: v0.1.0+ requires calling the exported function.
fix
Update code from `const engine = require('expeditious-engine-redis');` to `const engine = require('expeditious-engine-redis')({redis: options});`
affects: <0.1.0
Errors
Common errors & fixes
TypeError: engine is not a function
Missing call to the factory function when using require.
fix
Change `const engine = require('expeditious-engine-redis');` to `const engine = require('expeditious-engine-redis')({redis: {host: 'localhost', port: 6379}});`
Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED
Redis server not running or incorrect connection options.
fix
Ensure Redis is running and check host/port in options.
TypeError: Cannot read property 'set' of undefined
expeditious() call returned undefined due to invalid engine configuration.
fix
Verify that engineFactory returns a valid object and that expeditious is correctly called with engine option.
Upgrade
Version history
0.1.2latest on npm
Audit
Dependencies
redisrequiredRequired for Redis client operations
Agent activity
7 hits · last 30 days
node
6
Resources
expeditious-engine-redis — npm install expeditious-engine-redis · libregistry