]> git.ipfire.org Git - thirdparty/ccache.git/commit
Add --evict-older-than (#605)
authorSumit Jamgade <25170818+sjamgade@users.noreply.github.com>
Sun, 26 Jul 2020 18:14:19 +0000 (20:14 +0200)
committerGitHub <noreply@github.com>
Sun, 26 Jul 2020 18:14:19 +0000 (20:14 +0200)
commit87ae5e39e64cd1ec87b6ab593ba3d2ab07da43e2
tree40ea86440ecf3ca70a5c815a438627164bf630fe
parent1cbaa89d1175c906bea48e40eb8f5e8c56b5afe4
Add --evict-older-than (#605)

The argument adds another mechanism to control contents of cache directory. And
is based on the LRU tracking behaviour.

As of now there is no way for ccache to eliminate files which were
are no longer needed. As a result these files stay and are kept around until
either max_files/max_size is reached.

If a particular project is being built regularly but for some reason is allowed
to grow in size, then under such circumstances using the LRU mechanism to control
cache size, lends as perfect solution.

The argument takes a parameter N and performs a cleanup.
While performing cleanup the oldest file in ccache can
only be N seconds old. However this cleanup will not take max_files and
max_old into consideration
doc/MANUAL.adoc
src/Util.cpp
src/Util.hpp
src/ccache.cpp
src/cleanup.cpp
src/cleanup.hpp
src/stats.cpp
test/suites/cleanup.bash
unittest/test_Util.cpp