DataPoint Cache Layer (v4.1.1-alpha.0) provides a simple, Redis-backed cache API with an in-memory short-TTL (default 2s) layer for optimal performance. It wraps ioredis to offer get/set operations with configurable TTL, local caching, and automatic expiration sweeping. Designed for Node 8+, this package is part of the DataPoint ecosystem from ViacomInc. Compared to raw ioredis, it adds transparent local caching and simplified key-value storage. Low release cadence; alpha status indicates potential instability.
npm install data-point-cacheNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a cache instance, sets a value with TTL, retrieves it, and demonstrates missing key returns undefined.
Pin to exact version and test upgrades. Do not use in production without careful evaluation.
Use const Cache = require('data-point-cache'); then Cache.create() or destructure { create }.Ensure set returns a promise; await or .then() it. For no TTL, pass undefined or omit param.
Upgrade Node to version 8 or higher.
Use const Cache = require('data-point-cache'); const cache = await Cache.create();Start Redis server or configure redis option with correct host/port. No redis option defaults to localhost:6379.
Ensure you await Cache.create() and then call methods on the resolved cache object.
Use await or .then() to get the value. Example: const val = await cache.get('key');