ccache

from Wikipedia, the free encyclopedia
ccache
Basic data

developer Andrew Tridgell
Current  version 3.7.11
( July 21, 2020 )
operating system unixoid
programming language C.
category Compiler
License GNU General Public License
https://ccache.dev

ccache is a computer program that temporarily stores the product of a C / C ++ compiler ( ' to cache ') in order to accelerate the recompilation of the same source code.

The source code of a computer program usually consists of several files (in larger projects this can be several hundred to several thousand files), which are not all changed at the same time. As soon as the program is compiled, however, all source files must be individually translated into object files. However, since the unchanged files have already been compiled in the form in which they exist, it would not make sense to recompile them (which can take a lot of time). Instead, ccache uses the existing product.

To do this, it is always executed before the actual compiler. It checks whether the file to be compiled is already in the cache and only calls the compiler if this is not the case. The product (the object file) is then cached so that it is available for the next compilation process. If there is a compiled file in the cache, the compiler is not executed; instead, the copy is copied from the cache into the working directory (restored).

It is very important to ccache that the wrong version of the file is not accidentally restored. When comparing with the cached files, attention is not only paid to the file name, but also to the content including the header files included . This eliminates accidental false cache hits, so that the same end product is always produced, as if all files had been recompiled.

See also

Web links

  1. Release 3.7.11 . July 21, 2020 (accessed July 22, 2020).
  2. ^ The ccache Open Source Project on Open Hub: Languages ​​Page . In: Open Hub . (accessed October 18, 2018).