]> git.ipfire.org Git - thirdparty/ccache.git/commit
Add inode cache for file hashes (#577)
authorOlle Liljenzin <olle@liljenzin.se>
Sun, 31 May 2020 10:02:12 +0000 (12:02 +0200)
committerGitHub <noreply@github.com>
Sun, 31 May 2020 10:02:12 +0000 (12:02 +0200)
commit213d9883a0c3944749f8512eeb784d8572ad8d91
tree1b09cd16289fb38b2864e52c9125636f7b307fa5
parent82ecace939df039b0216333cc587546267afcb20
Add inode cache for file hashes (#577)

The inode cache is a process shared cache that maps from device, inode,
size, mtime and ctime to saved hash results. The cache is stored
persistently in a single file that is mapped into shared memory by
running processes, allowing computed hash values to be reused both
within and between builds.

The chosen technical solution works for Linux and might work on other POSIX
platforms, but is not meant to be supported on non-POSIX platforms
such as Windows.

Use 'ccache -o inode_cache=true/false' to activate/deactivate the cache.
28 files changed:
Makefile.in
configure.ac
doc/MANUAL.adoc
src/Config.cpp
src/Config.hpp
src/Context.cpp
src/Context.hpp
src/InodeCache.cpp [new file with mode: 0644]
src/InodeCache.hpp [new file with mode: 0644]
src/Stat.hpp
src/Util.cpp
src/Util.hpp
src/ccache.cpp
src/cleanup.cpp
src/cleanup.hpp
src/hashutil.cpp
src/hashutil.hpp
src/manifest.cpp
src/stats.cpp
src/stats.hpp
src/system.hpp
test/run
test/suites/base.bash
test/suites/inode_cache.bash [new file with mode: 0644]
unittest/test_Config.cpp
unittest/test_InodeCache.cpp [new file with mode: 0644]
unittest/test_Stat.cpp
unittest/test_Util.cpp