Registry / database / strapi-connector-redis

strapi-connector-redis

JSON →
library0.0.9jsnpmunverified

A deprecated Redis connector for the Strapi CMS framework that enables Redis client access in Strapi controllers and services. Version 0.0.9 (latest) relies on the node-redis driver and promisifies Redis commands for async/await usage. It is not an official Strapi package and is no longer maintained. Alternatives include using the official Strapi Redis plugin or integrating Redis directly via a custom service. The package has had infrequent updates and is considered unstable for production use.

npm install strapi-connector-redis
INSTALL
IMPORT
SIG · STRAPI-CONNECTOR-R
S
strapi-connector-redis
databasejavascriptv0.0.9
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.

strapi.redis
Accessed via strapi.redis.get('key') or strapi.redis.set('key', 'value') inside controllers/services
import redis from 'strapi-connector-redis'
No direct import needed; the connector adds a 'redis' object to the global strapi instance after configuration. Plugins and controllers access it as strapi.redis.
custom configuration
config/database.js exports connections with connector: 'redis'
Configuring via env variables only
Configuration is defined in Strapi's database config file, not exported or imported from this package.

Shows installation, configuration in Strapi database config, and usage of redis.get() in a controller.

// 1. Install: npm i strapi-connector-redis -S // 2. In config/database.js: module.exports = ({ env }) => ({ defaultConnection: 'default', connections: { default: { connector: 'bookshelf', settings: { client: 'sqlite', filename: env('DATABASE_FILENAME', '.tmp/data.db'), }, options: { useNullAsDefault: true, }, }, redis: { connector: 'redis', settings: { db: '0', host: '127.0.0.1', port: 6379, }, debug: true, }, }, }); // 3. In a controller or service: const fooValue = await strapi.redis.get('foo'); console.log(fooValue);
Debug
Known issues
deprecatedThis package is deprecated and no longer maintained. Do not use in new projects.
fix
Use official Strapi Redis plugin or implement custom Redis integration.
affects: >=0.0.1
deprecatedPackage relies on node-redis v2.x which is also deprecated. Newer node-redis (v4+) is incompatible.
fix
Update to a maintained Redis connector or use node-redis v4+ directly.
affects: 0.0.9
gotchaRedis commands are promisified, but error handling must be done manually; unhandled promise rejections can crash the app.
fix
Always use try/catch or .catch() on Redis calls.
affects: >=0.0.1
gotchaConnector only works when configured as a Strapi database connection; it does not add a standalone Redis client via plugin API.
fix
Ensure 'redis' connection is present in config/database.js.
affects: >=0.0.1
Errors
Common errors & fixes
Error: Cannot find module 'strapi-connector-redis'
Package not installed or not in node_modules.
fix
Run: npm install strapi-connector-redis --save
strapi.redis is undefined
Redis configuration missing or incorrect in config/database.js.
fix
Add a 'redis' connection in config/database.js as shown in quickstart.
Upgrade
Version history
0.0.9latest on npm
Audit
Dependencies
redisrequirednode-redis client for Redis connectivity
Agent activity
15 hits · last 30 days
node
12
Meta
1
OpenAI (training)
1
Resources
strapi-connector-redis — npm install strapi-connector-redis · libregistry