nvs icon indicating copy to clipboard operation
nvs copied to clipboard

Caching behavior and cache control commands

Open jasongin opened this issue 8 years ago • 2 comments

NVS caches downloaded archives (node*.7z, node*.tar.xz, etc.) at $NVS_HOME/cache. Currently these files remain in the cache indefinitely even after removing an installation via nvs rm.

Maybe the archives should also be removed by nvs rm. Or maybe there should be commands for managing the cache: nvs cache ls, nvs cache rm, nvs cache clear.

jasongin avatar Mar 02 '17 18:03 jasongin

When I stopped and restarted a download I got a "SHASUM256 does not match" error (mac OS 10.13). Here is the recent output for reference (notice that I stopped with control-C at 49%):

Brodys-MacBook-Pro:cdtest1 brodybits$ nvs add 11
Downloading [#############################################################################---------------------------------------------------------------------------------]  49%  83s ^C
Brodys-MacBook-Pro:cdtest1 brodybits$ 
Brodys-MacBook-Pro:cdtest1 brodybits$ 
Brodys-MacBook-Pro:cdtest1 brodybits$ 
Brodys-MacBook-Pro:cdtest1 brodybits$ 
Brodys-MacBook-Pro:cdtest1 brodybits$ nvs add 11
SHASUM256 does not match for cached file: node-v11.7.0-darwin-x64.tar.xz
Brodys-MacBook-Pro:cdtest1 brodybits$ 

Of course it would be really easy for me to delete the partially downloaded items from $NVS_HOME/cache (would love to see it documented). But it would be nice to see a better solution, someday.

P.S. In this case there was only node-v11.7.0-SHASUMS256.txt in my cache directory. Removing it did the trick for me.

brody4hire avatar Jan 23 '19 01:01 brody4hire

Yes, it should automatically delete and re-download if the cached file does not match the hash (or is missing).

jasongin avatar Jan 23 '19 16:01 jasongin