Skip to content
Commit 45b88974 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 2ee790ff
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment