stream-catcher
a streaming wrapper around lru-cache
usage
var streamCache = lru-cache options; // ask for the data at `'key'` to be streamed to `writeStream`streamCache; // ask to stream data to `'key'` from `readStream`streamCache;
example
stream files from disk to a http response, cached for next time.
var streamCache = max: 1024 * 100 // 100kb { return nlength; }; var filePath = './foo/bar.txt'; { streamCache; } // First call: Nms; // Next call: <Nms; // Time passes, file falls out of cache... // Next call ~ Nms;