ccache Compiler Cache Tool
ccache.dev
2
Leaving SiteNav
External Link Disclaimer
You are about to visit ccache.dev. This website is not operated by us. We are not responsible for its content or privacy practices.
About this website
ccache is a compiler cache that speeds up recompilation by caching previous compilations and detecting when the same compilation is being done again. Originally developed by Andrew Tridgell in 1993, ccache is maintained by Joel Rosdahl and the community. Key features: transparent wrapper around C and C++ compilers (GCC, Clang, MSVC) that intercepts compilation calls and checks if an identical compilation has been done before. Hash-based caching: creates a hash from the preprocessed source file, compiler options, compiler version, and environment, using it as a cache key to store and retrieve compiled object files. Cache hit returns the cached object file instantly without invoking the compiler, while cache miss falls through to the real compiler and stores the result. Significant speedups for incremental builds, CI/CD pipelines, and clean rebuilds, typically achieving 5-10x faster compilation times for projects with many source files. Distributed compilation support via remote cache (Redis, HTTP) for sharing compilation results across machines and teams. Configurable cache size and directory with automatic LRU eviction when the cache exceeds the limit. Statistics tracking for cache hit rate, misses, and errors. Debug mode for troubleshooting cache misses with per-file analysis. Compression of cached objects (zstd) to reduce disk usage. Supports C, C++, Objective-C, Objective-C++, CUDA, and assembly. Multi-compiler support detecting and routing to the correct compiler based on the original invocation. Sloppiness options for tuning cache hit rates by accepting minor differences (e.g., file mtime changes, macro definitions). Direct mode for faster cache lookup by hashing only the source file and options without preprocessing. Dependency file tracking for correct cache invalidation. Used by Mozilla, Chromium, LLVM, Android, and many large C and C++ projects.
Statistics
2
Views
0
Clicks
0
Like
0
Dislike