Ccache is free software that can speed repeated compilations by storing earlier results and recognizing when the same compilation recurs. It supports GCC, Clang, MSVC, and similar compilers, along with C, C++, assembler, CUDA, Objective-C, and Objective-C++, though support varies by compiler and language. Runtime support includes Linux, macOS, and native Windows; Windows with MSYS2 and other Unix-like systems are also listed at a different support level. Direct and depend modes can skip the preprocessor, while adaptable storage backends allow remote caching. Helpers support HTTP, HTTPS, and Redis protocols. Ccache tracks hit and miss statistics, manages cache size, and supports Zstandard compression. It uses BLAKE3 for its main input hash and XXH3 checksums to detect cache corruption. It works with build systems including Make, CMake, Ninja, and Visual Studio. Its scope is limited to compiling one file at a time: multi-file compilation, linking, and builds using unsupported flags fall back to the real compiler. The project says cache misses add overhead and recommends measuring typical workloads. Ccache is released under GNU GPL version 3 or later.
Who it is for
Ccache suits developers and build workflows that repeat supported single-file compilations, including projects using Make, CMake, Ninja, or Visual Studio. It can also suit teams configuring remote cache storage.
What is good
- Free software under GNU GPL version 3 or later.
- Supports GCC, Clang, and MSVC.
- Remote caching can use adaptable storage backends.
- Tracks cache statistics and manages cache size.
What to know first
- Only caches compilation of a single file.
- Linking and multi-file builds use the real compiler.
- Unsupported flags fall back to the real compiler.
- Cache misses add overhead.
Verdict
Ccache targets repeated single-file compilation and supports a range of compilers, languages, and build systems. Its limits and miss overhead make workload measurement relevant.
Ccache plans and pricing
All plansCompared on build cache software
- Free plan
- Yes
- Cache scope
- both
- Self-hosted option
- Yes
- Supported build systems
- Make, CMake, Ninja, Visual Studio
- Compiler/language support
- GCC, Clang, MSVC, NVCC, Intel C++, QNX, EDG-based compilers
- Open source
- Yes



