Registry / storage / node-stream-cache

node-stream-cache

JSON →
library0.0.4jsnpmunverified

A Node.js package that allows streaming data into a Redis cache and retrieving it as a stream. Version 0.0.4 is the latest release; no recent updates indicate active maintenance. It provides a simple API to cache the output of a function that returns a readable stream, with a configurable TTL. Unlike more comprehensive caching solutions, this package focuses solely on stream-based Redis caching with a minimal interface.

storage
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.

This package does not support ES module imports; use CommonJS require.

var Cache = require('node-stream-cache')

Demonstrates caching a request stream in Redis with a 60-second TTL.

var Cache = require('node-stream-cache'); var cacher = new Cache(); var request = require('request'); var JSONStream = require('JSONStream'); var work = function () { var parser = JSONStream.parse(['rows', true]); var req = request({url: 'http://isaacs.couchone.com/registry/_all_docs'}); req.pipe(parser); return parser; }; var done = function (stream) { stream.pipe(require('event-stream').mapSync(function (data) { console.error(data); return data; })); }; cacher.process('docs', work, done, 60);
Debug
Known footguns
deprecatedPackage has not been updated since 2013 and uses outdated API patterns.
gotchaRequires a running Redis instance; no fallback if Redis is unavailable.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
19 hits · last 30 days
bytedance
4
gptbot
3
amazonbot
3
ahrefsbot
1
Resources