LinuxCommandLibrary

ccache

C/C++ compiler cache.

TLDR

Show current cache [s]tatistics

$ ccache --show-stats
copy


[C]lear all cache
$ ccache --clear
copy


Reset ([z]ero) statistics (but not cache itself)
$ ccache --zero-stats
copy


Compile C code and cache compiled output (to use ccache on all gcc invocations, see the note above)
$ ccache gcc [path/to/file.c]
copy

Copied to clipboard