Registry / database / seneca-redis-store

seneca-redis-store

JSON →
library1.1.0jsnpmunverified

A Seneca.js data storage plugin that uses Redis to persist data. Current stable version is 1.1.0. It supports Seneca versions 1.x through 3.x. The plugin integrates as an underlying storage engine for the Seneca entity API, allowing CRUD operations via save$, load$, list$, and remove$. It differs from other Seneca stores by leveraging Redis for in-memory persistence with optional persistence to disk. The package is relatively stable but not actively maintained, with infrequent releases.

npm install seneca-redis-store
INSTALL
IMPORT
SIG · SENECA-REDIS-STORE
S
seneca-redis-store
databasejavascriptv1.1.0
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.

seneca-redis-store
seneca.use('redis-store', opts)
const store = require('seneca-redis-store')
The plugin is not imported directly; it is used via Seneca's use() method. The require() returns an object, but it must be passed to seneca.use().
entity
const apple = seneca.make$('fruit')
const apple = new seneca.make$('fruit')
seneca.make$() is a factory method, not a constructor. It does not require 'new'.
save$
apple.save$(function(err, apple) { ... })
apple.save$(callback())
The callback must be a function reference, not an invocation. Also common to forget error-first callback pattern.

Shows how to register the redis store plugin, create an entity, save it, and load it back.

const seneca = require('seneca')(); const opts = { 'redis-store': { uri: 'redis://localhost:6379' } }; seneca.use('redis-store', opts); seneca.ready(function() { const apple = seneca.make$('fruit'); apple.name = 'Pink Lady'; apple.price = 0.99; apple.save$(function(err, savedApple) { if (err) { console.error(err); return; } console.log('apple.id = ' + savedApple.id); apple.load$({id: savedApple.id}, function(err, loaded) { if (err) { console.error(err); return; } console.log('Loaded:', loaded.name); }); }); });
Debug
Known issues
deprecatedThe package is in maintenance mode; new development is focused on seneca-entity stores.
fix
Consider migrating to seneca-entity with a dedicated Redis store plugin if available.
affects: >=1.0.0
gotchaThe node_redis client used internally may have breaking changes between major versions. Ensure compatibility with the version bundled.
fix
Pin node_redis version if needed, or use Redis options to configure client.
affects: >=1.0.0
gotchaRequires a running Redis instance; no fallback to in-memory storage.
fix
Ensure Redis is running and accessible at the configured URI.
affects: >=0.0.0
gotchaErrors are returned via callback; Promises not natively supported.
fix
Wrap calls in a Promise or use util.promisify if needed.
affects: >=1.0.0
Errors
Common errors & fixes
Plugin not found: redis-store
seneca-redis-store not installed or not registered via seneca.use().
fix
Run 'npm install seneca-redis-store' and call seneca.use('redis-store', opts).
Reply error: entity not found for load$
The entity ID does not exist in Redis.
fix
Verify that the entity was saved first with a successful callback.
Error: Redis connection refused
Redis server not running or incorrect host/port.
fix
Start Redis server or check the connection string.
Upgrade
Version history
1.1.0latest on npm
Audit
Dependencies
senecarequiredSeneca framework is required to use this plugin; the plugin registers as a storage layer within Seneca.
Agent activity
8 hits · last 30 days
node
6
Meta
1
Resources
seneca-redis-store — npm install seneca-redis-store · libregistry