diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-09-08 19:03:11 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-09-10 15:56:12 +0900 |
commit | 55266475f599a82aa90a0cc7c7cd60efc57cc576 (patch) | |
tree | 608766d62236ac3c32c63b2728da74fc70b048d6 /dev-requirements.txt | |
parent | 2c898796940275073c5c0b1cc12ca3054a98006e (diff) | |
download | buildstream-55266475f599a82aa90a0cc7c7cd60efc57cc576.tar.gz |
_artifactcache/artifactcache.py: Sealing away some the estimated size
Previously, the API contract was to expose the estimated_size variable
on the ArtifactCache instance for all to see, however it is only relevant
to the ArtifactCache abstract class code. Subclasses were informed to
update the estimated_size variable in their calculate_cache_size()
implementation.
To untangle this and hide away the estimated size, this commit
does the following:
o Introduces ArtifactCache.compute_cache_size() API for external
callers
o ArtifactCache.compute_cache_size() calls the abstract method
for the CasCache subclass to implement
o ArtifactCache.compute_cache_size() updates the private
estimated_size variable
o All direct callers to ArtifactCache.calculate_cache_size(),
have been updated to use the ArtifactCache.compute_cache_size()
method instead, which takes care of updating anything local
to the ArtifactCache abstract class code (the estimated_size)
Diffstat (limited to 'dev-requirements.txt')
0 files changed, 0 insertions, 0 deletions