frerich / clcache

A compiler cache for MSVC, much like ccache for gcc
Other
325 stars 83 forks source link

Autoclean feature documentation #353

Closed abdullahtahiriyo closed 5 years ago

abdullahtahiriyo commented 5 years ago

Hi there!

Thanks for this piece of software.

I write to ask you for confirmation on the existence of an autoclean cache feature and what exactly it does.

I saw a reference to an automatic cache clean in one issue and with my poor Python skills, I went to the code to try to understand how it works. Could you confirm that it works like explained below and correct me if I am wrong?

Every time a new "object" is generated during compilation (because it is not in the cache), it is checked whether it fits in the cache. If it does not fit, a 10% of the size of the cache is cleaned, by removing the oldest objects. Then it is written into the cache.

Thank in advance, abdullah

frerich commented 5 years ago

Hi Abdullah,

you are correct. See the CacheFileStrategy.clean method which then cleans the 'manifest repository' and the 'compiler artifact repository' (the latter are the object files).

abdullahtahiriyo commented 5 years ago

Thanks!! :)