From 0402b1c7dbe549a7189ba8f4ab1ffb906117bfbd Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Thu, 1 Oct 2026 15:21:30 -1000 Subject: Keep clone files and oversized responses out of the cache The dumb transport reads files that already sit on the disk, so a pack copied into a slot cost that disk twice and the request a second write of every byte. A snapshot took a slot whatever its size, so a visitor naming distinct refs and ids could fill the cache root with archives. `cache-max-slot-size`, 64 MB unless set, now serves a larger response from the lock file and drops it, along with any expired copy it would have replaced. --- custom/cgitrc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'custom/cgitrc') diff --git a/custom/cgitrc b/custom/cgitrc index 06106c1..2dd738b 100644 --- a/custom/cgitrc +++ b/custom/cgitrc @@ -55,6 +55,11 @@ cache-about-ttl=15 # 5. cache-snapshot-ttl=5 +# Largest response, in kilobytes, that a cache slot keeps. A larger one is +# served but not kept. Value is an integer, and 0 removes the limit. Default is +# 65536. +cache-max-slot-size=65536 + # Expose the ls_cache page, which lists cache paths and the urls other visitors # requested. Values are 0 or 1. Default is 0. enable-cache-list=0 -- cgit v2.8.0