Registry / database / volos-cache-redis

volos-cache-redis

JSON →
library0.10.1jsnpmunverified

Redis-backed caching library for the Volos system. Version 0.10.1 provides a simple cache interface with configurable TTL, encoding, and Redis connection settings (host, port, DB). It is a part of the Apigee Volos ecosystem, offering a consistent API via volos-cache-common. Supports namespaced caches. Note: this package is deprecated and no longer maintained; users should migrate to alternative caching solutions.

npm install volos-cache-redis
INSTALL
IMPORT
SIG · VOLOS-CACHE-REDIS
V
volos-cache-redis
databasejavascriptv0.10.1
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.

createCache
✓ import { createCache } from 'volos-cache-redis'
✗ const volos = require('volos-cache-redis');
ESM import example; the library may also support CommonJS require.
default
✓ import volosCacheRedis from 'volos-cache-redis'; const cache = volosCacheRedis.createCache();
✗ const cache = require('volos-cache-redis').createCache();
CommonJS require of default export; note that createCache is a method on the default export.
create
✓ const cacheModule = require('volos-cache-redis'); cacheModule.create('myCache', options);
✗ import { create } from 'volos-cache-redis';
The main export is an object with a create method; named export 'create' does not exist.

Shows how to create a Redis cache instance with a TTL, set a key-value pair, and retrieve it asynchronously.

const cacheModule = require('volos-cache-redis'); const options = { ttl: 5000, host: process.env.REDIS_HOST ?? '127.0.0.1', port: parseInt(process.env.REDIS_PORT ?? '6379'), db: 0 }; const cache = cacheModule.create('myCache', options); cache.set('key', 'value', function(err) { if (err) console.error(err); else console.log('Value set'); }); cache.get('key', function(err, value) { if (err) console.error(err); else console.log('Value:', value); });
Debug
Known issues
deprecatedPackage is deprecated; no longer actively maintained.
fix
Migrate to an alternative caching library such as ioredis or node-cache-manager with Redis store.
affects: >=0.0.0
gotchacreate function must be called with a name and options; the name acts as a namespace.
fix
Ensure you pass a unique string as the first argument to create.
affects: >=0.0.0
gotchaThe library forces return_buffers to true in Redis options.
fix
Expect Buffer values from get(); convert to string if needed using .toString().
affects: >=0.0.0
Errors
Common errors & fixes
Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED
Redis server is not running or not accessible at the specified host/port.
fix
Start Redis server or configure correct host/port in options.
TypeError: cacheModule.create is not a function
Incorrect import: trying to import named export 'create' which does not exist.
fix
Use default export: const cacheModule = require('volos-cache-redis'); then cacheModule.create(...).
Upgrade
Version history
0.10.1latest on npm
Audit
Dependencies
volos-cache-commonrequiredProvides the common cache interface that this module extends
redisrequiredRequired for Redis database driver
Agent activity
25 hits · last 30 days
node
20
OpenAI (training)
1
Resources
volos-cache-redis — npm install volos-cache-redis · libregistry