$ ccache --help
Usage:
ccache [ccache options] ccache [KEY=VALUE ...] compiler [compiler options] compiler [compiler options] The first form takes options described below. The second form invokes the
compiler, optionally using configuration options from KEY=VALUE arguments.
In the third form, ccache is masquerading as the compiler.
Common options:
-c, --cleanup delete not recently used files and recalculate
size counters (normally not needed as this is
done automatically) -C, --clear clear the cache completely (except configuration) --config-path PATH operate on configuration file PATH instead of the
default
-d, --dir PATH operate on cache directory PATH instead of the
default
--evict-namespace NAMESPACE
remove files created in namespace NAMESPACE
--evict-older-than AGE remove files used less recently than AGE
(unsigned integer with a d (days) or s (seconds) suffix) -F, --max-files NUM set maximum number of files in cache to NUM (use
0for no limit) -M, --max-size SIZE set maximum size of cache to SIZE (use 0for no
limit); available suffixes: kB, MB, GB, TB
(decimal) and KiB, MiB, GiB, TiB (binary); default suffix: GiB
-X, --recompress LEVEL recompress the cache to level LEVEL (integer or
"uncompressed") --recompress-threads THREADS
use up to THREADS threads when recompressing the
cache; default: number of CPUs
-o, --set-config KEY=VALUE set configuration option KEY to value VALUE
-x, --show-compression show compression statistics
-p, --show-config show current configuration options in
human-readable format
--show-log-stats print statistics counters from the stats log
in human-readable format
-s, --show-stats show summary of configuration and statistics
counters in human-readable format (use
-v/--verbose once or twice for more details) -v, --verbose increase verbosity
-z, --zero-stats zero statistics counters
-h, --help print this help text
-V, --version print version and copyright information
Options for remote file-based storage:
--trim-dir PATH remove not recently used files from directory
PATH until it is at most the size specified by
--trim-max-size (note: don't use this option to
trim the local cache) --trim-max-size SIZE specify the maximum size for --trim-dir (use 0for no limit); available suffixes: kB, MB, GB, TB
(decimal) and KiB, MiB, GiB, TiB (binary); default suffix: GiB
--trim-method METHOD specify the method (atime or mtime)for --trim-dir; default: atime
--trim-recompress LEVEL
recompress to level LEVEL (integer or
"uncompressed") --trim-recompress-threads THREADS
use up to THREADS threads when recompressing; default: number of CPUs
Options for scripting or debugging:
--checksum-file PATH print the checksum (128 bit XXH3) of the file at
PATH
--extract-result PATH extract file data stored in result file at PATH
to the current working directory
-k, --get-config KEY print the value of configuration key KEY
--hash-file PATH print the hash(160 bit BLAKE3) of the file at
PATH
--inspect PATH print result/manifest file at PATH in
human-readable format
--print-stats print statistics counter IDs and corresponding
values in machine-parsable format
See also the manual on <https://ccache.dev/documentation.html>.