nvs
nvs copied to clipboard
Caching behavior and cache control commands
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
.
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.
Yes, it should automatically delete and re-download if the cached file does not match the hash (or is missing).