From bf935e13de26cc6cea78b100fd3ebaf6dbef5fc5 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Fri, 5 Aug 2022 16:42:16 +0200 Subject: [PATCH] feat: Enable inode cache by default See discussion #1086. --- doc/MANUAL.adoc | 13 ++++++------- src/Config.hpp | 2 +- test/suites/inode_cache.bash | 1 - 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/doc/MANUAL.adoc b/doc/MANUAL.adoc index 31e4c148d..4027ffad5 100644 --- a/doc/MANUAL.adoc +++ b/doc/MANUAL.adoc @@ -774,14 +774,13 @@ might be incorrect. [#config_inode_cache] *inode_cache* (*CCACHE_INODECACHE* or *CCACHE_NOINODECACHE*, see _<>_ above):: - If true, enables caching of source file hashes based on device, inode and - timestamps. This will reduce the time spent on hashing included files as - the result can be resused between compilations. + If true, ccache will cache source file hashes based on device, inode and + timestamps. This reduces the time spent on hashing include files since the + result can be resused between compilations. The default is true. The feature + requires <> to be located on a local + filesystem of a supported type. + -The feature is still experimental and thus off by default. It is currently not -available on Windows. -+ -The feature requires *temporary_dir* to be located on a local filesystem. +NOTE: The inode cache feature is currently not available on Windows. [#config_keep_comments_cpp] *keep_comments_cpp* (*CCACHE_COMMENTS* or *CCACHE_NOCOMMENTS*, see _<>_ above):: diff --git a/src/Config.hpp b/src/Config.hpp index 66920b1cd..1d62b0010 100644 --- a/src/Config.hpp +++ b/src/Config.hpp @@ -177,7 +177,7 @@ private: bool m_hash_dir = true; std::string m_ignore_headers_in_manifest; std::string m_ignore_options; - bool m_inode_cache = false; + bool m_inode_cache = true; bool m_keep_comments_cpp = false; double m_limit_multiple = 0.8; std::string m_log_file; diff --git a/test/suites/inode_cache.bash b/test/suites/inode_cache.bash index fe49d566b..755726caa 100644 --- a/test/suites/inode_cache.bash +++ b/test/suites/inode_cache.bash @@ -16,7 +16,6 @@ SUITE_inode_cache_PROBE() { } SUITE_inode_cache_SETUP() { - export CCACHE_INODECACHE=1 export CCACHE_DEBUG=1 unset CCACHE_NODIRECT export CCACHE_TEMPDIR="${CCACHE_DIR}/tmp" # isolate inode cache file -- 2.47.3