Fix file hash caching for apt backend. #143
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Cache file hashes across
freight cacheruns for apt backend. It seems to work. Attempt to address #123.The infrastructure for this already existed, it's just that it stored the cache files in the always-freshly-created work directory, so the previous run's cache data never carried over. This essentially just moves those files into
$VARLIBinstead of$DISTCACHE.For a 23GB registry,
freight cachetimes are decreased from 9m 30s to about 7 seconds.TODO:
$DIST.$CACHE != "on".Implementation notes:
/var/lib/freight/.apt/(or wherever$VARLIBis).*-controlfiles because info about where those are is unavailable at the point of hash generation.freight-clear-cache.$CACHEis"on".