Ccache
Ccache is a free build tool that can speed repeated compilations by storing previous results and recognizing when a single-file compilation recurs.
What Ccache is
Ccache is a free build tool that can speed repeated compilations by storing previous results and recognizing when a single-file compilation recurs. It supports compilers including GCC, Clang, and MSVC, as well as C, C++, assembler, CUDA, Objective-C, and Objective-C++, with support varying by compiler and language. Runtime support includes Linux, macOS, and native Windows, plus Windows with MSYS2 and other Unix-like platforms at a different support level. Direct and depend modes can avoid running the preprocessor. Remote caching can be set up through adaptable storage backends, with helpers for HTTP, HTTPS, and Redis protocols. Ccache records cache 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 data corruption. Its license is GNU GPL version 3 or later. Ccache only handles one-file compilations: multi-file builds, linking, and compilations with unsupported flags fall back to the real compiler. The project notes that cache misses add overhead and advises measuring typical workloads.
Good
- Supports GCC, Clang, and MSVC.
- Includes direct and depend cache modes.
- Supports remote storage backends.
- Tracks cache statistics and manages cache size.
- Free software under GNU GPL version 3 or later.
Watch out
- Only caches single-file compilations.
- Multi-file builds and linking use the real compiler.
- Cache misses add overhead.
Who it suits
Ccache suits developers who repeatedly compile individual files and want to reuse prior compilation results. It supports users of build systems including Make, CMake, Ninja, and Visual Studio.
Verdict
Ccache may reduce repeated single-file compilation work, with broad compiler and build-system support. Its limits on multi-file builds and the overhead of misses are worth considering for a typical workload.
Plans and prices
From Ccache's own pricing page, checked 30 Sep 2026.
| Plan | Price | What it gives you |
|---|---|---|
| Ccache | Free | Caches single-file compilations · Some compiler flags fall back to the real compiler · Free software under GNU GPL version 3 or later |
The facts
Each one read from Ccache's own pages, with the date it was checked.
What it does
- Cache management
- It tracks cache hit and miss statistics and manages cache size automatically.checked 30 Sep 2026
- Cache modes
- Direct and depend modes can avoid running the preprocessor.checked 30 Sep 2026
- Compilation limits
- Ccache handles compilation of one file at a time; multi-file compilation and linking fall back to the real compiler.checked 30 Sep 2026
- Compilers
- The site lists GCC, Clang, MSVC, and other similar compilers, with support levels varying by compiler.checked 30 Sep 2026
- Compression and hashes
- Ccache supports Zstandard compression, uses BLAKE3 for its main input hash, and uses XXH3 checksums to detect cache corruption.checked 30 Sep 2026
- Compression and hashing
- Ccache supports Zstandard compression, uses BLAKE3 for the main input hash and uses XXH3 checksums to detect cache data corruption.checked 29 Sep 2026
- Downloads
- The download page lists source archives, macOS and Linux binaries, and a Windows x86_64 binary for version 4.14.1.checked 30 Sep 2026
- Integrity caveat
- The site notes that direct mode has a corner case that can cause false-positive cache hits.checked 30 Sep 2026
- Languages
- It supports C, C++, assembler, CUDA, Objective-C, and Objective-C++.checked 30 Sep 2026
- License
- Ccache is free software released under the GNU General Public License version 3 or later.checked 29 Sep 2026
- 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.checked 29 Sep 2026
- Maintainer
- Ccache has been developed and maintained by Joel Rosdahl since 2010.checked 30 Sep 2026
- 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.checked 29 Sep 2026
- Performance caveat
- The site says cache misses typically add 5%–20% overhead, or 1%–3% with depend mode enabled, and recommends measuring typical workloads.checked 29 Sep 2026
- Purpose
- Ccache speeds up recompilation by caching previous compilations and reusing results when the same compilation is repeated.checked 30 Sep 2026
- Release verification
- Release archives starting with version 4.12 are signed with minisign, and the download page explains how to verify them.checked 30 Sep 2026
- Remote caching
- Ccache supports remote caching through custom storage backends adaptable to remote storage protocols.checked 30 Sep 2026
- Security
- Release archives starting with version 4.12 are signed with minisign, and the download page gives instructions for verifying them.checked 29 Sep 2026
- Storage integrations
- Listed storage helpers support HTTP, HTTPS, Redis, rediss, and redis+unix protocols.checked 30 Sep 2026
- Support
- The site directs users to its bug report page, issue tracker, discussions, and mailing list.checked 30 Sep 2026
- Support and community
- The site directs users to report bugs, open issues, contribute through the source repository, and use discussions or the mailing list.checked 29 Sep 2026
Where it runs
- Platforms
- Runtime support is rated A for Linux, macOS, and native Windows; other Unix-like platforms and Windows with MSYS2 are rated B.checked 30 Sep 2026
The full review of Ccache
Overview
Ccache is a free build utility for projects that repeatedly compile eligible source files with supported compilers. It is most compelling in development workflows where the same single-file compilations recur; it is not a whole-build cache.
Its broad compiler and build-system coverage makes it a practical option across varied toolchains, but the single-file boundary matters: linking, multi-file compilation, and unsupported flags still use the real compiler.
Key features
Compilation reuse and scope
Ccache detects repeated compilations and reuses cached results. Direct and depend modes can skip preprocessing, reducing work on a cache hit. The benefit is workload-dependent: builds dominated by eligible repeated compilations stand to gain most, while time spent linking or compiling multiple files together remains outside its reach.
Misses are not free. Ccache says they typically add 5%–20% overhead, or 1%–3% with depend mode enabled, and recommends measuring representative workloads. That makes it a better fit for projects with enough repeat work to offset the cost than for builds that mostly encounter misses.
Toolchain and build-system coverage
Compiler support includes GCC, Clang, MSVC, NVCC, Intel C++, QNX, and EDG-based compilers. Supported languages include C, C++, assembler, CUDA, Objective-C, and Objective-C++, with support levels varying by compiler and language. Make, CMake, Ninja, and Visual Studio are supported build systems. This breadth suits mixed toolchains, but a project should confirm support for its exact compiler and language combination.
Storage, management, and integrity
Ccache can use custom backends for remote caching, with storage helpers for HTTP, HTTPS, Redis, rediss, and redis+unix. This gives teams ways to adapt it to remote storage, rather than a packaged hosted cache service. It tracks hit and miss statistics and manages cache size automatically.
Zstandard compression, BLAKE3 input hashing, and XXH3 checksums support compact storage, cache-key calculation, and corruption detection. Direct mode has a documented corner case that can produce false-positive cache hits, a caveat worth weighing where cache correctness is especially sensitive. Release archives from version 4.12 onward are signed with minisign, with verification instructions provided on the download page.
Pricing
Ccache costs nothing, under the GNU General Public License version 3 or later. The free software plan includes caching single-file compilations, while some compiler flags fall back to the real compiler. There is no paid tier to choose between, but users should account for its compilation limits and miss overhead when deciding whether it suits their workload.
Platforms
Runtime support at level A covers Linux, macOS, and native Windows; Windows with MSYS2 and other Unix-like platforms are supported at level B. Downloads include source archives, macOS and Linux binaries, and a Windows x86_64 binary for version 4.14.1. Self-hosting is supported, which suits teams managing their own build infrastructure.
Who it's for
Ccache is a strong fit for developers and teams that repeatedly compile individual files using supported toolchains and want a free, self-hostable cache with options for remote storage. It is less suitable when build time is concentrated in linking, multi-file compilation, unsupported flags, or workloads with too few cache hits to offset miss overhead. The project provides bug reporting, issue tracking, discussions, and a mailing list for community support.
Pros and cons
- Broad toolchain and build-system coverage: support spans major compiler families, several languages, and Make, CMake, Ninja, and Visual Studio, though support levels vary.
- Free, self-hostable software: the GPL-licensed plan has no subscription price and can fit teams operating their own infrastructure.
- Flexible remote storage: custom backends and listed HTTP, HTTPS, and Redis-family helpers let teams adapt caching to their storage setup.
- Narrow compilation scope: multi-file compilation, linking, and unsupported flags fall back to the compiler, limiting gains for builds dominated by those tasks.
- Miss overhead and direct-mode caveat: misses can add time, and direct mode has a false-positive-hit corner case to consider.
Alternatives
Bitrise is worth considering for teams seeking a broader build platform across Android, iOS, Linux, macOS, and self-hosted environments; its free Hobby plan is for a team of one and provides build credits for a small project a few times per month.
EngFlow Remote Caching may suit teams that want in-cluster remote caching on one machine with up to 32 CPU cores on its free Linux plan, or an enterprise option with custom pricing.
cachepot is another free, open-source option for Linux, macOS, self-hosted, and Windows environments.
NativeLink is a better match for teams seeking a self-hosted distributed scheduler and remote caching across build systems, with major cloud-provider support in its open-source offering.
FosterStack offers a full self-hosted cache server on its free, MIT-licensed plan, with security patches and a FIPS image included; it may suit teams wanting a cache server rather than Ccache's single-file compilation cache.
Cachely is a hosted API-and-web option whose free plan includes 1 GiB of managed storage, 500K requests per month, three workspaces, five API tokens, and a build insights dashboard.
Buildless may suit teams looking for an API-and-web service with a free individual/OSS offer of one project, one user, 3GB of cache space, and 100GB of transfer, marked as coming soon.
Vercel is a web and API platform rather than a direct single-file compilation-cache alternative.
For more options, browse Build Cache Software.
Verdict
Choose Ccache if repeated single-file compilations make up meaningful work in your builds and you want a free tool with broad compiler support and adaptable storage. Look elsewhere if you need a cache for whole builds, linking, or multi-file compilation, or if misses are likely to outweigh the repeated work it can save.
Getting started
- Visit https://ccache.dev/ to find downloads and installation information.
- Choose an available build for Linux, macOS or Windows, or use a self-hosted setup.
- Check that your compiler and language are supported for your workflow.
- Use it with a supported build system such as Make, CMake, Ninja or Visual Studio.
- Consider direct or depend mode and remote storage backends if they suit your build.
Limits worth knowing
Ccache handles single-file compilation only; multi-file compilation, linking and compilations with unsupported flags fall back to the real compiler. The project notes cache misses typically add 5%–20% overhead, or 1%–3% with depend mode enabled, and recommends measuring typical workloads.
Questions
Does Ccache cost anything?
No. It is free software under GNU GPL version 3 or later.
Which compilers and languages does it support?
Compilers include GCC, Clang and MSVC, among others; supported languages include C, C++, assembler, CUDA, Objective-C and Objective-C++. Support varies by compiler and language.
Which operating systems can run it?
Runtime support includes Linux, macOS and native Windows. Windows with MSYS2 and other Unix-like platforms are also supported at a different level.
Can Ccache use remote storage?
Yes. Custom storage backends can be adapted to remote storage protocols; listed helpers support HTTP, HTTPS and Redis protocols.
What does Ccache cache?
It caches compilation of a single file. Multi-file compilation, linking and compilations using unsupported flags fall back to the real compiler.





