Freedom251 › Build Cache Software
clcache

What clcache is
clcache is a free, open-source Python script for Microsoft Visual C++ builds on Windows. It intercepts calls to cl.exe and reuses cached object files when a build can use an existing result; invocations it does not support can be relayed to the compiler. The cache key combines preprocessed source, a normalized command line, and the compiler binary’s size and modification time.
The documented cache path handles compile invocations using /c, supports /Z7, and excludes /link and /Zi. Command-line options let users inspect cache statistics, clean or clear cached data, and set the maximum cache size. The default 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 usage when the cache and build directories are on the same drive.
The project documents Visual Studio and MSBuild integration and recommends disabling TrackFileAccess to avoid cache and file-tracking problems. A running clcachesrv.py process can cache file hashes; a memcached backend can save and restore cached data. The source uses the BSD 3-Clause License unless an individual file states otherwise.
Who it suits
clcache suits Windows developers compiling with Microsoft Visual C++ cl.exe through Visual Studio or MSBuild who want to reuse object files. It can also fit workflows that use AppVeyor or a self-hosted setup, provided the documented invocation requirements fit their builds.
What it does well
- Free, open-source software under the BSD 3-Clause License.
- Reuses cached object files for supported cl.exe invocations.
- Offers cache statistics, cleanup, clearing, and size controls.
- Supports configurable object-file compression and hard-link mode.
- Documents Visual Studio and MSBuild integration.
What to know first
- Windows is the only listed platform.
- INCLUDE and LIBPATH changes may go undetected.
- The documented cache path excludes /link and /Zi invocations.
- Hard-link mode requires cache and build directories on the same drive.
Limits
The default maximum cache size is 1073741824 bytes (1 GiB). The documented cache path requires /c, excludes /link and /Zi, and does not support INCLUDE or LIBPATH; changes to those environment variables may not be detected. Changing compression settings requires clearing the cache.
Plans
| Plan | Billed and limits | Price |
|---|---|---|
| clcache | BSD 3-Clause licensed source code · default cache size 1 GiB | Free |
As github.com lists them, read 8 Oct 2026. The maker's own page has the final word.
Getting started
- Open the project website on GitHub.
- Use a Windows environment with Microsoft Visual C++ cl.exe.
- Integrate clcache with Visual Studio or MSBuild using the project documentation.
- Use compile invocations that include /c; /Z7 is supported, while /link and /Zi are excluded.
- Set the cache size or other cache options from the command line if needed.
Verdict
Choose clcache if you build on Windows with Microsoft Visual C++ cl.exe and want a local cache for supported compile commands. Check the invocation and environment-variable limits against your build, especially if it relies on /Zi, /link, INCLUDE, or LIBPATH changes.
Questions
How much does clcache cost?
The listed plan is free. The source is open source under the BSD 3-Clause License unless a file states otherwise.
Which platforms and compilers does it support?
Windows is the listed platform, and the compiler support is Microsoft Visual C++ cl.exe.
Does clcache work with Visual Studio and MSBuild?
The project documents integration with both Microsoft Visual Studio and MSBuild.
What build commands can use the documented cache path?
The path requires /c, supports /Z7, and excludes /link and /Zi.
Can clcache use a shared cache?
The listed cache scope is local. The project also describes a running clcachesrv.py process for caching file hashes and a memcached backend for saving and restoring cached data.
What is the default cache size?
The default maximum cache size is 1073741824 bytes (1 GiB).
Facts from clcache's own pages
- 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, 8 Oct 2026
- Cache controls
- The command line options include cache statistics, cleanup, clearing, and setting the maximum cache size. · github.com, 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, 8 Oct 2026
- Cache size limit
- The default maximum cache size is 1073741824 bytes (1 GiB). · github.com, 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, 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, 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, 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, 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, 8 Oct 2026
- License
- The project source is subject to the BSD 3-Clause License unless a file states otherwise. · github.com, 8 Oct 2026
- Purpose
- clcache is a Python script that avoids unnecessary recompilation by reusing cached object files for Microsoft Visual Studio. · github.com, 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, 8 Oct 2026
- Supported compile invocations
- The documented cache path requires /c, excludes /link, and excludes /Zi, while /Z7 is supported. · github.com, 8 Oct 2026
Where clcache stands on Freedom251
- Build Cache Software#13 of 23