Ccache
ccache.dev
What it is
Ccache is a build tool that can reduce repeated compilation work by storing prior results and recognizing when a single-file compilation recurs. It supports compilers such as GCC, Clang and MSVC, and languages including C, C++, assembler, CUDA, Objective-C and Objective-C++, with support varying by compiler and language. Runtime support includes Linux, macOS and native Windows at support level A, and Windows with MSYS2 and other Unix-like platforms at level B. Direct and depend modes can avoid running the preprocessor. Remote caching is possible through adaptable storage backends, with listed helpers for HTTP, HTTPS and Redis protocols. Ccache records cache hit and miss statistics, manages cache size, supports Zstandard compression, and uses BLAKE3 and XXH3 in its hashing and corruption checks. It works with Make, CMake, Ninja and Visual Studio. It is free software under the GNU GPL version 3 or later. Its scope has limits: multi-file compilation, linking and compilations with unsupported flags fall back to the real compiler. The project also cautions that cache misses add overhead and recommends measuring typical workloads.
Spec sheet
- Purpose
- Ccache speeds up recompilation by caching previous compilations and reusing results when the same compilation is repeated.Read 30 Sep 2026 · ccache.dev
- Platforms
- Runtime support is rated A for Linux, macOS, and native Windows; other Unix-like platforms and Windows with MSYS2 are rated B.Read 30 Sep 2026 · ccache.dev
- Security
- Release archives starting with version 4.12 are signed with minisign, and the download page gives instructions for verifying them.Read 29 Sep 2026 · ccache.dev
- Support
- The site directs users to its bug report page, issue tracker, discussions, and mailing list.Read 30 Sep 2026 · ccache.dev
- License
- Ccache is free software released under the GNU General Public License version 3 or later.Read 29 Sep 2026 · ccache.dev
- Cache management
- It tracks cache hit and miss statistics and manages cache size automatically.Read 30 Sep 2026 · ccache.dev
- Cache modes
- Direct and depend modes can avoid running the preprocessor.Read 30 Sep 2026 · ccache.dev
- Compilation limits
- Ccache handles compilation of one file at a time; multi-file compilation and linking fall back to the real compiler.Read 30 Sep 2026 · ccache.dev
- Compilers
- The site lists GCC, Clang, MSVC, and other similar compilers, with support levels varying by compiler.Read 30 Sep 2026 · ccache.dev
- Compression and hashes
- Ccache supports Zstandard compression, uses BLAKE3 for its main input hash, and uses XXH3 checksums to detect cache corruption.Read 30 Sep 2026 · ccache.dev
- Compression and hashing
- Ccache supports Zstandard compression, uses BLAKE3 for the main input hash and uses XXH3 checksums to detect cache data corruption.Read 29 Sep 2026 · ccache.dev
- Downloads
- The download page lists source archives, macOS and Linux binaries, and a Windows x86_64 binary for version 4.14.1.Read 30 Sep 2026 · ccache.dev
- Integrity caveat
- The site notes that direct mode has a corner case that can cause false-positive cache hits.Read 30 Sep 2026 · ccache.dev
- Languages
- It supports C, C++, assembler, CUDA, Objective-C, and Objective-C++.Read 30 Sep 2026 · ccache.dev
- Limitations
- Ccache only caches compilation of a single file; multi-file compilation and linking fall back to the real compiler, as do compilations using unsupported flags.Read 29 Sep 2026 · ccache.dev
- Maintainer
- Ccache has been developed and maintained by Joel Rosdahl since 2010.Read 30 Sep 2026 · ccache.dev
- Operating systems
- Runtime support includes Linux, macOS and native Windows at support level A, plus Windows with MSYS2 and other Unix-like platforms at level B.Read 29 Sep 2026 · ccache.dev
- Performance caveat
- The site says cache misses typically add 5%–20% overhead, or 1%–3% with depend mode enabled, and recommends measuring typical workloads.Read 29 Sep 2026 · ccache.dev
- Release verification
- Release archives starting with version 4.12 are signed with minisign, and the download page explains how to verify them.Read 30 Sep 2026 · ccache.dev
- Remote caching
- Ccache supports remote caching through custom storage backends adaptable to remote storage protocols.Read 30 Sep 2026 · ccache.dev
- Storage integrations
- Listed storage helpers support HTTP, HTTPS, Redis, rediss, and redis+unix protocols.Read 30 Sep 2026 · ccache.dev
- Support and community
- The site directs users to report bugs, open issues, contribute through the source repository, and use discussions or the mailing list.Read 29 Sep 2026 · ccache.dev
Plans and prices
Strong points and limits
Strong points
- Supports GCC, Clang and MSVC
- Offers direct and depend cache modes
- Supports adaptable remote storage backends
- Works with Make, CMake, Ninja and Visual Studio
- Free under GNU GPL version 3 or later
Limits
- Only caches single-file compilations
- Linking falls back to the real compiler
- Unsupported flags use the real compiler
- Cache misses add overhead
Who it suits
Ccache suits developers who want to reuse results from repeated single-file compilations. It is relevant to projects using supported compilers and build systems, including teams that need remote cache storage.
Verdict
Ccache can avoid repeated work for compilations within its single-file scope, with options for local and remote caching. Its fallback behavior and cache-miss overhead make workload measurement important.
Where Specifiction places it
- Build Cache Software#3 of 238.4