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 --dry-run do not perform any write operations --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 0 for no limit) -M, --max-size SIZE set maximum size of cache to SIZE (use 0 for 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") -o, --set-config KEY=VALUE set configuration option KEY to value VALUE in the configuration file -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) --threads THREADS use up to THREADS threads for threaded operations; default: number of CPUs -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 0 for 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") 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 --format FORMAT specify format for --print-log-stats and --print-stats (tab, json); default: tab -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 --stop-storage-helpers stop running storage helper(s), if any --print-log-stats print statistics counter IDs and corresponding values from the stats log in machine-parsable format --print-stats print statistics counter IDs and corresponding values in machine-parsable format --print-version print version only See also the manual on .