Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Readable streams can be passed to opts.fileCache #121

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sebdeckers
Copy link

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.

@goto-bus-stop
Copy link
Member

goto-bus-stop commented Mar 9, 2018

I think this need is addressed by the persistentCache option that was added in #124?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants