module-deps icon indicating copy to clipboard operation
module-deps copied to clipboard

Readable streams can be passed to opts.fileCache

Open sebdeckers opened this issue 9 years ago • 1 comments

Allows stream.Readable instances in fileCache. Duck-typing the stream so other allowed types (String/Buffer) will not be affected.

Seemed like there is no provided way to persist the cache. I'm using a Proxy's getOwnPropertyDescriptor trap (triggered by xhas) to dynamically populate the cache with asynchronous fs.readFile calls.

Would otherwise suggest having an asynchronous fileRead API with a cache lookup callback in the options.

sebdeckers avatar Nov 07 '16 14:11 sebdeckers

I think this need is addressed by the persistentCache option that was added in https://github.com/browserify/module-deps/pull/124?

goto-bus-stop avatar Mar 09 '18 11:03 goto-bus-stop