From 31583be830904f53c4afbc94ebf13a7f0c1dd2bc Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Wed, 4 Nov 2026 18:55:30 -1000 Subject: Define the cache slot --- MANUAL.txt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'MANUAL.txt') diff --git a/MANUAL.txt b/MANUAL.txt index 5cd9e91..c95b67e 100644 --- a/MANUAL.txt +++ b/MANUAL.txt @@ -69,9 +69,9 @@ cache-index-ttl:: cache-max-slot-size:: Number which specifies the largest response, in kilobytes, that a cache - slot may keep. A larger response is still served but not kept, so one - archive cannot take a slot's worth of disk. Set to "0" to remove the - limit. Default value: "65536" (64 MB). See also: "The cache". + slot may keep. A larger response is still served but not kept, which + caps the cache directory at about cache-size times this. Set to "0" to + remove the limit. Default value: "65536" (64 MB). See also: "The cache". cache-root:: Path used to store the cgit cache entries. A scan-path keeps its cached @@ -977,6 +977,10 @@ will be cached indefinitely, even if the underlying git repository changes. Conversely, when a ttl value is zero, the cache is disabled for that particular page type. A response larger than "cache-max-slot-size" is served but not kept. +Each cached page is kept in a slot, a file in the cache directory named after a +hash of the request. cache-size sets how many slots there are, and two pages +whose hashes land on the same slot push each other out, which is logged. + The cache directory holds one file per slot and the cached results of scan-path as rc-* files, plus transient lock files, all created by cgit itself. Create the directory ahead of time, owned by the account the web server runs cgit as, with -- cgit 2.12.1