{"id":45092,"library":"hemera-redis-cache","title":"hemera-redis-cache","description":"A plugin that integrates Redis as a caching layer for Hemera microservices, using the Node Redis driver. Version 5.0.0 is the current stable release. It requires hemera-joi for validation and is part of the Hemera ecosystem. Designed for microservice caching with NATS messaging; last updated several years ago (maintenance mode).","status":"maintenance","version":"5.0.0","language":"javascript","source_language":"en","source_url":"ssh://git@github.com/hemerajs/hemera-redis-cache","tags":["javascript"],"install":[{"cmd":"npm install hemera-redis-cache","lang":"bash","label":"npm"},{"cmd":"yarn add hemera-redis-cache","lang":"bash","label":"yarn"},{"cmd":"pnpm add hemera-redis-cache","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required for Joi validation in plugin configuration","package":"hemera-joi","optional":false}],"imports":[{"note":"CommonJS only; no ESM support.","wrong":"import hemeraRedisCache from 'hemera-redis-cache'","symbol":"hemera-redis-cache","correct":"const hemeraRedisCache = require('hemera-redis-cache')"},{"note":"Pass the require result directly, not a function call.","wrong":"hemera.use(hemeraRedisCache())","symbol":"plugin","correct":"hemera.use(require('hemera-redis-cache'))"},{"note":"ttl must be a number, not string.","wrong":"hemera.use(require('hemera-redis-cache'), { ttl: '300' })","symbol":"options","correct":"hemera.use(require('hemera-redis-cache'), { ttl: 300 })"}],"quickstart":{"code":"const Hemera = require('nats-hemera')\nconst nats = require('nats').connect()\nconst hemera = new Hemera(nats)\n\nhemera.use(require('hemera-joi'))\nhemera.use(require('hemera-redis-cache'))\n\nhemera.ready(() => {\n  console.log('Hemera with Redis cache is ready')\n})","lang":"javascript","description":"Shows how to instantiate Hemera with NATS and add the Redis cache plugin."},"warnings":[{"fix":"Upgrade Node.js to 8.0.0 or newer.","message":"Dropped support for Node.js versions < 8.0.0.","severity":"breaking","affected_versions":">=5.0.0"},{"fix":"Ensure hemera.use(require('hemera-joi')) is called before hemera-redis-cache.","message":"hemera-joi must be loaded before hemera-redis-cache.","severity":"gotcha","affected_versions":">=4.0.0"},{"fix":"Consider forking or migrating to alternative caching solutions.","message":"The plugin is no longer actively maintained; use at your own risk.","severity":"deprecated","affected_versions":">=5.0.0"}],"env_vars":null,"search_vec":"'5.0.0':23 'ago':54 'cach':4,12,46 'current':26 'design':43 'driver':21 'ecosystem':42 'hemera':2,15,32,41 'hemera-joi':31 'hemera-redis-cach':1 'integr':8 'javascript':57 'joi':33 'last':50 'layer':13 'mainten':55 'messag':49 'microservic':16,45 'mode':56 'nat':48 'node':19 'part':38 'plugin':6 'redi':3,9,20 'releas':28 'requir':30 'sever':52 'stabl':27 'updat':51 'use':17 'valid':35 'version':22 'year':53","created_at":"2026-06-07T12:53:19.536344+00:00","updated_at":"2026-06-07T12:53:19.536344+00:00","problems":[{"fix":"Run: npm install hemera-joi","cause":"Missing peer dependency hemera-joi.","error":"Error: Cannot find module 'hemera-joi'"},{"fix":"Start Redis: redis-server or docker-compose up (see README).","cause":"Redis server not running or unreachable.","error":"Error: Redis connection to 127.0.0.1:6379 failed"},{"fix":"Ensure you created hemera with new Hemera(nats) and have NATS connection.","cause":"hemera instance not initialized correctly.","error":"TypeError: hemera.use is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/hemerajs/hemera-redis-cache#readme","github":"ssh://git@github.com/hemerajs/hemera-redis-cache","docs":null,"changelog":null,"pypi":null,"npm":"hemera-redis-cache","openapi_spec":null,"status_page":null,"smithery":null,"categories":["database","caching"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}