]> git.ipfire.org Git - thirdparty/ccache.git/commit
fix: Use a cleanup stamp instead of directory timestamp for cleanup
authorJoel Rosdahl <joel@rosdahl.net>
Sat, 18 Jun 2022 18:08:10 +0000 (20:08 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Sat, 18 Jun 2022 18:08:58 +0000 (20:08 +0200)
commitec27506da3a03e0f5bf5f80494174fcdd9a43b0e
tree1987dfb85102b2968652fd514cde7fae1b4f1693
parentce6b0c3dbdf1f84ab625d4c86770297f93b87032
fix: Use a cleanup stamp instead of directory timestamp for cleanup

In order to know when to clean up the temporary directory, ccache checks
mtime of $CCACHE_DIR and updates it to "now" on cleanup. This doesn't
work well when the configuration file is modified often since that also
updates the same mtime.

Fix this by using a separate cleanup stamp file instead.
src/storage/Storage.cpp
src/storage/primary/PrimaryStorage.cpp
src/storage/primary/PrimaryStorage.hpp