Ccache is a computer program that caches the product of a C / C compiler (English, to cache ' ), so as to speed up recompiling the same source code.
The source code of a computer program usually consists of several files ( for larger projects may be the several hundred to several thousand files ) that are not all changed at the same time. Once the program is compiled, but all the source files must be individually translated into object files. However, since the unchanged files were already in the form in which they are present, compiled, it would not make sense, they again translate (which can cost a lot of time). Instead, use ccache the existing product.
There is always performed prior to the actual compiler. It checks whether the file to be compiled is already present in the cache, and causes the compiler to only when this is not the case. The product ( the object file ) is then stored in the cache to be available in the next compilation. A compiled file in the cache, the compiler is not running, the cached copy is instead copied to the working directory ( restored).
Ccache attaches great importance to not accidentally the wrong version of the file is restored. To this end, care is taken when comparing with the cached files not only on the file name, but on the content together with the included header files. This excludes inadvertent false cache hits, so getting the same end product is produced as if you recompile all files.