Meshblu cache library for caching Meshblu device data, version 1.9.1. This package provides a simple in-memory cache with TTL support for Meshblu core services. It is part of the Octoblu ecosystem and is used internally by other Meshblu components. The library has low release cadence and minimal dependencies, primarily relying on lodash and redis. It offers basic set/get/del operations and is not intended for general-purpose caching outside of Meshblu.
npm install meshblu-core-cacheNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a cache instance with Redis backend, then sets, gets, and deletes a key.
Always provide a redis configuration object in production.
Upgrade to >=1.5.0 for promise support.
Update TTL values from milliseconds to seconds.
Check for null explicitly.
No need to catch errors for non-existent keys.
Use const Cache = require('meshblu-core-cache');Check REDIS_HOST and REDIS_PORT environment variables or pass correct config.
Ensure you have created an instance: const cache = new Cache(options);