- Home
- Build Cache Software
- clcache
clcache
What it is
clcache is a free, open-source Python script for Windows builds using Microsoft Visual Studio’s cl.exe compiler. It intercepts compiler calls and reuses cached object files to avoid recompiling unchanged work, while unsupported invocations can be passed to the real compiler. Cache keys use preprocessed source, a normalized command line, and compiler binary size and modification time. Command-line controls provide statistics, cleanup, clearing, and maximum-size settings; the default limit is 1073741824 bytes (1 GiB). Object files can be compressed at levels 1 through 9, though changing compression settings requires clearing the cache. Hard-link mode can improve speed and disk use when cache and build directories share a drive. Documentation covers Visual Studio and MSBuild, recommends disabling TrackFileAccess, and describes a hashing server and memcached backend. The source is under the BSD 3-Clause License.
For and against
For
- Free BSD 3-Clause licensed source
- Supports Visual Studio and MSBuild integration
- Configurable cache size and compression
- Provides cache statistics and cleanup controls
- Self-hosted caching options are documented
Against
- Windows platform only
- INCLUDE and LIBPATH changes may go undetected
- Documented path excludes /link and /Zi
- Hard links require the same drive
The verdict
clcache focuses on reusing compiler outputs in Microsoft Visual C++ workflows. Its controls and integrations suit local Windows builds, but documented invocation and environment-variable limits should be checked first.
Who it suits
It is intended for Windows developers building with Microsoft Visual Studio’s cl.exe through Visual Studio or MSBuild who want local object-file reuse.
Plans and prices
clcache
BSD 3-Clause licensed source code · default cache size 1 GiB
Read 8 Oct 2026 · github.com
On the record
- Build integrations
- The README documents integration with Visual Studio and MSBuild and recommends disabling TrackFileAccess to avoid cache deletion and file tracking issues.github.com · read 8 Oct 2026
- Cache controls
- The command line options include cache statistics, cleanup, clearing, and setting the maximum cache size.github.com · read 8 Oct 2026
- Cache key
- The cache key uses preprocessed source, a normalized command line, and the compiler binary’s size and modification time.github.com · read 8 Oct 2026
- Cache size limit
- The default maximum cache size is 1073741824 bytes (1 GiB).github.com · read 8 Oct 2026
- Compiler integration
- It is designed to intercept calls to cl.exe and can relay unsupported invocations to the real compiler.github.com · read 8 Oct 2026
- Compression
- Object files can be compressed, with a configurable compression level from 1 to 9; changing compression settings requires clearing the cache.github.com · read 8 Oct 2026
- Hard links
- Hard-link mode can improve speed and disk usage, but requires the cache and build directories to be on the same drive.github.com · read 8 Oct 2026
- Intended users
- The project is intended for users building with Microsoft Visual Studio’s cl.exe compiler who want to reuse compiled object files.github.com · read 8 Oct 2026
- Known limitation
- The INCLUDE and LIBPATH environment variables are listed as unsupported, and changes to them may not be detected between compilations.github.com · read 8 Oct 2026
- License
- The project source is subject to the BSD 3-Clause License unless a file states otherwise.github.com · read 8 Oct 2026
- Purpose
- clcache is a Python script that avoids unnecessary recompilation by reusing cached object files for Microsoft Visual Studio.github.com · read 8 Oct 2026
- Shared cache options
- A running clcachesrv.py process can cache file hashes, and a memcached backend can be used to save and restore cached data.github.com · read 8 Oct 2026
- Supported compile invocations
- The documented cache path requires /c, excludes /link, and excludes /Zi, while /Z7 is supported.github.com · read 8 Oct 2026