When one reinstalls a package, chocolatey:
-
Removes the download cache directory at "C:\Users$user\AppData\Local\Temp\chocolatey$package$version" as part of the uninstall function.
For this, it seems to be calling "remove_cache_for_package(config, packageVersion)" in NugetServices.cs
-
Then, it redownloads the files that had previously been in the cache
-
Then, verifies the checksums of the newly downloaded files
This is not optimal as chocolatey could simply reuse the files in the cache directory, verify their checksums, and redownload only when the sums don't match.
When one reinstalls a package, chocolatey:
Removes the download cache directory at "C:\Users$user\AppData\Local\Temp\chocolatey$package$version" as part of the uninstall function.
For this, it seems to be calling "remove_cache_for_package(config, packageVersion)" in NugetServices.cs
Then, it redownloads the files that had previously been in the cache
Then, verifies the checksums of the newly downloaded files
This is not optimal as chocolatey could simply reuse the files in the cache directory, verify their checksums, and redownload only when the sums don't match.