Skip to content
Snippets Groups Projects
Commit f5afbeda authored by Tiago Gomes's avatar Tiago Gomes
Browse files

Revamp calculation of cache size code

Before this commit, the cache size was being calculated every time an
artifact was committed to or pulled to the artifact cache. This is a
very IO demanding operation that doesn't scale as the cache gets bigger.

Now that the commit() and pull() methods of the ArtifactCache return the
number of bytes added, we can rework the code to calculate the size of
The cache only once at startup and to dynamically update it afterwards.

The ArtifactClean.clean() is also changed to return the number of bytes
removed instead of the new size of the cache, so that we no longer need
the ArtifactClean.clean._set_cache_size() method.

The CacheSize job is no longer used and is removed.

Fixes #573.
parent bb1b696b
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment