Ccache is a software development tool that caches builds so that next time the same build can be avoided and the results can be removed from the cache.
This can greatly speed up recompilation time. Detection is done by hash of different types of information that must be exclusive to the compilation and then using the hash sum to identify the cached output.
Ccache is licensed under the GNU General Public License.
To install Ccache you can build it from scratch and install it with the tools CMake and GNU Make by cloning the source code from the repository on GitHub:
But, Cache is available in most package manager repositories. For example, to install on Ubuntu:
We know that compilations that use RegEx tend to take a little longer than normal. Suppose you have this code in C++:
To speed up compilation, you must pass the compilation command to ccache
:
To compile with GCC
Or, if it is with Clang:
You can link ccache
to be used as a default, e.g.: ln -s ccache /usr/local/bin/g++
.
For parameter tips and optimizations, see the help or manual:
Also visit the repository and the official website: https://ccache.dev/.