Registry / storage / qiao-redis

qiao-redis

JSON →
library6.0.3jsnpmunverified

A lightweight Node.js Redis cache wrapper with simplified API for common caching operations. Currently at version 6.0.3, maintained actively with infrequent releases. Differentiates from redis and ioredis with a minimal API focused on caching (get/set/del) rather than full Redis command set. Not suitable for complex Redis operations or pub/sub.

npm install qiao-redis
INSTALL
IMPORT
SIG · QIAO-REDIS
Q
qiao-redis
storagejavascriptv6.0.3
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.

QRedis
import QRedis from 'qiao-redis'
const QRedis = require('qiao-redis').default
Package has a default export. CommonJS require returns the default directly.

Initializes a Redis cache client, sets a key with TTL, retrieves it, deletes it, and closes connection.

import QRedis from 'qiao-redis'; const cache = new QRedis({ host: 'localhost', port: 6379, password: process.env.REDIS_PASSWORD ?? '' }); await cache.set('key', 'value', 3600); // expires in 1 hour const value = await cache.get('key'); console.log(value); // 'value' await cache.del('key'); await cache.close();
Debug
Known issues
gotchaPackage does not support Redis Cluster or Sentinel out of the box.
fix
Use redis or ioredis directly for cluster/sentinel configurations.
affects: >=0.0.0
gotchaCalling `get()` on a non-existent key returns `null`, not `undefined`.
fix
Check for `null` explicitly when using `get()`.
affects: >=0.0.0
breakingVersion 6.0 switched from callbacks to Promises. Old callback-style usage will break.
fix
Upgrade to v6+ and use async/await or .then().
affects: <6.0.0
Errors
Common errors & fixes
TypeError: redis.createClient is not a function
Incompatible version of underlying 'redis' package installed.
fix
Install 'redis' v3 or v4 compatible with this package: npm install redis@3
Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED
Redis server not running or host/port misconfigured.
fix
Ensure Redis server is running and accessible. Check host and port in options.
Upgrade
Version history
6.0.3latest on npm
Audit
Dependencies
redisrequiredUnderlying Redis client driver used for connection and commands
Agent activity
23 hits · last 30 days
node
22
OpenAI (training)
1
Resources
qiao-redis — npm install qiao-redis · libregistry