]> 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, 20 Aug 2022 11:54:17 +0000 (13:54 +0200)
commita7637751e65b49ddaeef5913c37e2987e21e7d33
tree4d53447a0d9ab5d236dc8af98014b83db0171ca2
parent602ca8c8b1971077943e1abe17be4cc7b29b0b5f
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.

(cherry picked from commit ec27506da3a03e0f5bf5f80494174fcdd9a43b0e)
src/storage/Storage.cpp
src/storage/primary/PrimaryStorage.cpp
src/storage/primary/PrimaryStorage.hpp