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

Update FILES when reading from disk? #5

Closed
developit opened this issue May 15, 2018 · 4 comments
Closed

Update FILES when reading from disk? #5

developit opened this issue May 15, 2018 · 4 comments

Comments

@developit
Copy link
Contributor

I might be missing something, but would it make sense to update the cached entry in FILES when going to disk in the request handler?

@lukeed
Copy link
Owner

lukeed commented May 15, 2018

Update what portion of the entry?

@lukeed
Copy link
Owner

lukeed commented May 15, 2018

Maybe I'm misreading the question on second go-round, but the FILES cache is updated here as a result of tiny-glob's output.

We're expanding the glob pattern initially to retrieve the fs.stats objects & save the absolute paths. Then passing the stats for writing headers & passing the filepath into fs.createReadStream which is piped into the outgoing response.

Initially I thought you were asking about updating FILES during the pipe from fs into res. If that is the question, then what needs to be updated?

@lukeed
Copy link
Owner

lukeed commented May 18, 2018

Spoke with Jason offline; we're okay to close this 😄

@lukeed lukeed closed this as completed May 18, 2018
@lukeed
Copy link
Owner

lukeed commented Aug 20, 2018

Version 0.2.0 now includes a --dev flag (and option) which bypasses the files cache entirely. Indicated by the name, not meant for production~!

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

No branches or pull requests

2 participants