From: Joel Rosdahl Date: Wed, 31 May 2023 17:39:06 +0000 (+0200) Subject: docs: Clarify --evict-older-than semantics X-Git-Tag: v4.8.2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33cebe20ecb0cc48ebcb024145b881f06300a89d;p=thirdparty%2Fccache.git docs: Clarify --evict-older-than semantics Closes #1292. --- diff --git a/doc/MANUAL.adoc b/doc/MANUAL.adoc index d353575ee..28922e089 100644 --- a/doc/MANUAL.adoc +++ b/doc/MANUAL.adoc @@ -84,13 +84,14 @@ documentation. *-c*, *--cleanup*:: - Clean up the cache by removing old cached files until the specified file - number and cache size limits are not exceeded. This also recalculates the - cache file count and size totals. Normally, there is no need to initiate - cleanup manually as ccache keeps the cache below the specified limits at - runtime and keeps statistics up to date on each compilation. Forcing a - cleanup is mostly useful if you have modified the cache contents manually or - believe that the cache size statistics may be inaccurate. + Clean up the cache by removing not recently used cached files until the + specified file number and cache size limits are not exceeded. This also + recalculates the cache file count and size totals. Normally, there is no + need to initiate cleanup manually as ccache keeps the cache below the + specified limits at runtime and keeps statistics up to date on each + compilation. Forcing a cleanup is mostly useful if you have modified the + cache contents manually or believe that the cache size statistics may be + inaccurate. *-C*, *--clear*:: @@ -118,9 +119,9 @@ documentation. *--evict-older-than* _AGE_:: - Remove files older than _AGE_ from the cache. _AGE_ should be an unsigned - integer with a `d` (days) or `s` (seconds) suffix. If combined with - `--evict-namespace`, only remove old files within that namespace. + Remove files used less recently than _AGE_ from the cache. _AGE_ should be + an unsigned integer with a `d` (days) or `s` (seconds) suffix. If combined + with `--evict-namespace`, only remove files within that namespace. *-h*, *--help*:: @@ -201,8 +202,8 @@ documentation. *--trim-dir* _PATH_:: - Remove old files from directory _PATH_ until it is at most the size - specified by `--trim-max-size`. + Remove not recently used files from directory _PATH_ until it is at most the + size specified by `--trim-max-size`. + WARNING: Don't use this option to trim the local cache. To trim the local cache directory to a certain size, use `CCACHE_MAXSIZE=_SIZE_ ccache -c`. diff --git a/src/core/mainoptions.cpp b/src/core/mainoptions.cpp index e2c22b954..2789876ff 100644 --- a/src/core/mainoptions.cpp +++ b/src/core/mainoptions.cpp @@ -98,9 +98,9 @@ constexpr const char USAGE_TEXT[] = In the third form, ccache is masquerading as the compiler. Common options: - -c, --cleanup delete old files and recalculate size counters - (normally not needed as this is done - automatically) + -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 @@ -108,8 +108,9 @@ Common options: default --evict-namespace NAMESPACE remove files created in namespace NAMESPACE - --evict-older-than AGE remove files older than AGE (unsigned integer - with a d (days) or s (seconds) suffix) + --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 @@ -137,10 +138,10 @@ Common options: -V, --version print version and copyright information Options for remote file-based storage: - --trim-dir PATH remove old 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-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);