I found that when the DiskCache limit is reached, almost every addition to the cache results in a Purge operation (which can be quite expensive). This is because the purge operation deletes files until the cache size is just below the limit. This PR is more aggressive and reduces the cache by 50% on purge.
I found that when the DiskCache limit is reached, almost every addition to the cache results in a Purge operation (which can be quite expensive). This is because the purge operation deletes files until the cache size is just below the limit. This PR is more aggressive and reduces the cache by 50% on purge.