From 7a2022d02b30e3a9423b377106eac6d81f5ef448 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Tue, 22 Sep 2026 22:33:48 -1000 Subject: 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. --- source/cmd.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'source/cmd.h') diff --git a/source/cmd.h b/source/cmd.h index f580fa1..f47878b 100644 --- a/source/cmd.h +++ b/source/cmd.h @@ -17,7 +17,13 @@ struct cgit_cmd { }; /* - * The entry naming ctx.qry.page, or NULL when no page goes by that name. + * The entry for the page named, or NULL when no page goes by that name. + */ +extern const struct cgit_cmd *cgit_find_cmd(const char *name); + +/* + * The entry naming ctx.qry.page, after filling in the default page for the + * request, or NULL when no page goes by that name. */ extern const struct cgit_cmd *cgit_get_cmd(void); -- cgit 2.12.1