Caching wrapper for node.js' built-in fs module (or compatible)
Wrap node.js' fs module in a cached read-only version that exposes the same interface. Can speed up things if you're reading the same files and directories multiple times.
Doesn't expose the functions that write to disc, so no cache invalidation is ever performed internally.
var CachedFs = require'cachedfs'fs = require'fs';fsreadFile'foo.txt'fsreadFile'foo.txt'// Much faster this time!;;
fsimplementation doesn't support a given sync method, it will produce the correct result if the CachedFs instance happens to have a cached copy of the async method's result.
Make sure you have node.js and npm installed, then run:
npm install cachedfs
3-clause BSD license -- see the
LICENSE file for details.