coa-redis (v1.7.0) is a lightweight Redis component for the coajs framework on Node.js, written in TypeScript and built on top of ioredis. It provides functional components including a key-value data cache, a lightweight message queue with worker pattern, cron-based timing tasks, and distributed locks. All operations require a namespace parameter for data isolation. The library is small (hundreds of lines) with no third-party dependencies beyond ioredis. Release cadence is low, with the last update likely from 2021.
npm install coa-redisNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a RedisBin configuration instance and a RedisCache, then sets and gets cache data with a namespace.
Always pass a string as the first argument to set/get/delete methods (e.g., redisCache.set('module1', 'mykey', value)).Check the library source or manually prefix keys if global prefix is required.
Avoid using 'trace'; rely on ioredis's built-in monitoring.
Call close/destroy methods on the components when no longer needed.
Run 'npm install coa-redis' or 'yarn add coa-redis'.
Use correct import: import { RedisBin } from 'coa-redis' (ESM) or const { RedisBin } = require('coa-redis') (CJS).Ensure you pass a namespace string as the first argument: redisCache.get('mynamespace', 'myid').