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

Optimistically cache tarballs when packages change? #102

Open
nolanlawson opened this issue Feb 16, 2016 · 1 comment
Open

Optimistically cache tarballs when packages change? #102

nolanlawson opened this issue Feb 16, 2016 · 1 comment

Comments

@nolanlawson
Copy link
Member

When you install lodash@^4.0.0, then local-npm will cache and store 4.0.0 for future npm installs.

However, if 4.0.1 is published after you npm install, then local-npm will find out about it via the changes feed, but it will not download the actual tarballs.

So if you then go offline and try to npm install again, it will fail because local-npm knows that there is a newer version that matches your version range, but it hasn't been downloaded yet.

Question: should local-npm optimistically cache every version of Lodash that gets published, simply because you once installed lodash@^4.0.0?

Pros: more likely to work offline, less likely to cause unexpected errors, fits the "standard" pattern of caret- and tilde-versioning.

Cons: Potentially a lot of network traffic and a lot of wasted disk spaces for module versions that you might never use.

@nolanlawson nolanlawson changed the title Optimistically cache tarballs when packages change Optimistically cache tarballs when packages change? Feb 16, 2016
@jesstelford
Copy link

I npm install a lot while tethering (side projects I work on while commuting). Even the existing changes feed make me nervous about going over my ridiculously low data cap.

I'd support optimistic tarball caching if it's configurable (and off by default).

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

No branches or pull requests

3 participants