Diff options
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Stop caching clone files and oversized responses
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.
-rw-r--r--MANUAL.txt13
-rw-r--r--custom/cgitrc5
-rw-r--r--source/cache.c25
-rw-r--r--source/cache.h8
-rw-r--r--source/cgit.c20
-rw-r--r--source/cgit.h1
-rw-r--r--source/cmd.c16
-rw-r--r--source/cmd.h8
-rwxr-xr-xtests/t0003-cache.sh43
9 files changed, 124 insertions, 15 deletions