HMC Homepage      CS Home

How to use ccache

Ccache is a compiler cache which speeds up the re-compilation of your C/C++ code. It does so by caching previous compiles and using a hash to figure out which code has actually been altered and then only recompiling that code.

To use ccache you need to prefix your compile commands with "ccache" . Since ccache is only useful for multiple compiles, this should be included in your Makefile. For more information on Makefiles see the make qref. For example instead of the "CC=gcc" line, you could write, "CC=ccache gcc"

Ccache has been extensively tested so that the code will produce exactly the same output (including all warnings, etc) as if ccache were not being used, only faster. However, since it is relatively new (March 2002) if you ever notice that ccache changes the way your code compiles, you should let the developer know at bugs@ccache.samba.org

For more information about ccache, consult the man page - ccache(1), or else the ccache web site, http://ccache.samba.org.


HMC Computer Science Department
Contact Information
Last Modified Saturday, 11-May-2002 08:30:05 PDT