WIP: Add command to clean unreferencable things from binary caches#325
WIP: Add command to clean unreferencable things from binary caches#325autoantwort wants to merge 12 commits intomicrosoft:mainfrom
Conversation
|
Before investing too much into this PR; could you update the original post with a description of the intended behavior of the command and one or two example scenarios of how a user would use it in context? |
|
I have updated the description. I normally used it as follows: Example output of |
# Conflicts: # include/vcpkg/archives.h # src/vcpkg/archives.cpp # src/vcpkg/binarycaching.cpp
b991ad3 to
80bd939
Compare
# Conflicts: # include/vcpkg/archives.h # src/vcpkg/base/system.process.cpp
|
It might be worth it making vcpkg also remember when a package was last restored from the binary cache. That way, when in a pinch, you could just remove the package from classic and re-install / delete install dir from projects that use manifest mode and which you use most often and configure. Then instruct vcpkg to delete everything that has not been restored for x days. That would especially help if you have some packages that are extremely costly to build (cgal, embree, ...) and you do not have the time to wait for that. I prototyped this in ArchivesBinaryProvider::try_restore_n and it seems to do the job. The implementation is quite blunt though (it just places a marker file next to the archive). |
# Conflicts: # include/vcpkg/archives.h # include/vcpkg/base/system.process.h # include/vcpkg/binarycaching.h # src/vcpkg/archives.cpp # src/vcpkg/base/system.process.cpp
# Conflicts: # src/vcpkg/binarycaching.cpp # src/vcpkg/commands.cpp
Motivation: From time to time the binary cache grows. For example mine is 70 GB large, but only a small subset of the cache entries are needed in the future. The rest can be deleted. Currently I only can delete the whole cache but then have to rebuild everything.
Intended and Implemented Features:
powershell 7.2.1Nice to have features: