ccache is a caching tool for compilers that helps speed up the compiling process by serving as a code repository, thereby reducing the time taken by the compiler to build a binary executable from the codebase.
The main benefit of having a compiler cache is to improve build time productivity. Common issues arise when developers perform "make clean; make" to perform clean builds due to numerous reasons. Consequently, all information from previous compiles is lost. CCache helps prevent this issue by allowing you to acquire the same outcome with "make clean; make" but in a much shorter period. It is also handy for RPM builds, as it makes incremental builds less complicated.
The creator of CCache, Sam Liddicott, evolved this software by writing it from scratch for Samba's build farm. Approximately 30 machines perform clean builds of Samba after every CVS commit, taking over an hour in some cases. Using CCache accomplishes the same clean build result in a much shorter time, about six times faster. Another use case for implementing CCache was running the autobuild system for Quantum. An OS based on Linux was built from scratch after each CVS commit to catch compilation problems quickly. This entire process was substantially quicker when using CCache.
CCache features automatic cache size management and keeps statistics on cache hits/misses, can cache compiles that generate warnings, and uses hard links where feasible to decrease the need for copies. Installation is easily managed, and CCache has very low overhead. Some other new features added in the latest release of CCache include handling of hard-linked compilers on AIX, allowing O_BINARY support, and a new CCACHE_TEMPDIR option to add to the older CCACHE_READONLY option. The stats output shows the cache directory, and handling of the HOME environment variable has been fixed.
Version 2.4: N/A