ccache
$ ccache Community Low RiskCompiler cache wrapper for C, C++, Objective-C, and CUDA compilers (gcc, clang). Transparently caches object compilations by preprocessed hash to speed up branch switches and CI runs, with --show-stats, --print-stats, and --show-config inspection.
brew install ccache Local compiler wrapper binary invoked transparently by CMake/Make or directly for cache inspection.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Fully non-interactive with --print-stats machine-readable output and --show-config, though it lacks --json formatting.
--print-statsemits stable tab-delimited key-value stats- Zero interactive prompts
Safe local cache wrapper; only destructive operation is explicit cache clearing (ccache -C).
- Read-only
--show-stats/--show-configdiagnostics
Small, fast C++ binary packaged across Homebrew, Linux distros, and Windows releases.
- Cross-platform static/system packages
Dramatically reduces C/C++ rebuild latency across branches; primarily used transparently via CMAKE_C_COMPILER_LAUNCHER=ccache.
- Transparent integration with CMake, Meson, and Make
Actively maintained open-source project (ccache/ccache) with modern remote storage support.
- Active
ccache/ccacherepository
Thorough single-page manual and clear --help.
- Official manual at ccache.dev/manual
Security, Auth & Guardrails
Local disk caching requires no credentials; optional Redis/HTTP remote storage reads URLs/tokens from ccache.conf.
GPL-3.0-or-later open-source tool; completely free.
# ccache Agent Rules - Use `ccache --print-stats` and `ccache --show-config` for non-destructive inspection. - Never run `ccache -C` (`--clear`) unless the user explicitly asks to wipe the shared compiler cache.
Agent-Ready Command Recipes
Safe Read-Only Queries
ccache --print-stats
Emits tab-separated key-value cache hit/miss counters for scripting without mutating state.
ccache --show-config
Displays all active cache directory, max size, and compression settings with their origin.
Controlled Writes & Previews
ccache clang -c main.c -o build/main.o
Compiles main.c into build/main.o while storing/reusing cached object output.
Strengths for Agents
- +
--print-statsand--show-configmake cache hit rate and configuration verification effortless. - + Speeds up repetitive agent edit-compile cycles on C/C++ repos with minimal setup.
Caveats & Pitfalls
- ! No
--jsonoutput mode (uses tab-separated key-value pairs in--print-stats). - ! Cache directory writes require writable storage (or
CCACHE_DISABLE=1in read-only sandboxes).