Registry / database / deepstream.io-cache-redis

deepstream.io-cache-redis

JSON →
library1.2.2jsnpmunverified

Redis cache connector for deepstream.io, version 1.2.2. Provides a persistent cache backend using Redis for deepstream's data storage. Currently in maintenance mode as deepstream.io v5 has deprecated this plugin in favor of a unified storage connector. Supports optional TTL for cache entries and connects via the ioredis library. Alternative to built-in in-memory cache with persistence across server restarts.

npm install deepstream.io-cache-redis
INSTALL
IMPORT
SIG · DEEPSTREAM.IO-CACH
D
deepstream.io-cache-redis
databasejavascriptv1.2.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.

RedisCacheConnector
const RedisCacheConnector = require('deepstream.io-cache-redis');
import RedisCacheConnector from 'deepstream.io-cache-redis';
Package uses CommonJS; no default ES module export. Use require, not import.
default
const RedisCacheConnector = require('deepstream.io-cache-redis');
No named exports; the only export is the constructor function.

Configures deepstream.io server to use Redis as cache backend with host, port, optional database index and TTL.

const Deepstream = require('deepstream.io'); const RedisCacheConnector = require('deepstream.io-cache-redis'); const server = new Deepstream(); server.set('cache', new RedisCacheConnector({ port: 6379, host: 'localhost', db: 0, ttl: 86400 })); server.start();
Debug
Known issues
deprecateddeepstream.io-cache-redis is deprecated as of deepstream.io v5. Use deepstream.io-storage-redis instead.
fix
Replace with deepstream.io-storage-redis and update connector import.
affects: >=5.0.0
gotchaRequires ioredis as a peer dependency; not installed automatically with npm. Must be added manually.
fix
Run: npm install ioredis
affects: >=1.0.0
breakingDoes not support deepstream.io v4 or later. Only compatible with v3.x.
fix
Upgrade to deepstream.io v5 and use deepstream.io-storage-redis instead.
affects: >=1.0.0
gotchaOptions are passed directly to ioredis; any ioredis option like 'enableReadyCheck' may affect behavior.
fix
Refer to ioredis documentation for all available options.
affects: >=1.0.0
deprecatedThe npm package has not been updated since 2016; no support for newer Redis features or bug fixes.
fix
Migrate to a maintained alternative like deepstream.io-storage-redis.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Redis connection failed: getaddrinfo ENOTFOUND localhost
Redis server is not running or host is incorrect.
fix
Ensure Redis is installed and running. Verify host and port in configuration.
Cannot find module 'ioredis'
ioredis peer dependency not installed.
fix
Run: npm install ioredis
TypeError: RedisCacheConnector is not a constructor
Using ES6 import instead of require; package uses CommonJS.
fix
Change to const RedisCacheConnector = require('deepstream.io-cache-redis');
Upgrade
Version history
1.2.2latest on npm
Audit
Dependencies
ioredisrequiredUnderlying Redis client used for all connections and operations
deepstream.iorequiredPeer dependency; plugin requires deepstream server to function
Agent activity
8 hits · last 30 days
node
8
Resources
deepstream.io-cache-redis — npm install deepstream.io-cache-redis · libregistry