RFC: don't cache objects larger than X

Konstantin Ryabitsev mricon at kernel.org
Mon Oct 10 16:03:12 CEST 2016


Hi, all:

I have an unfortunate problem of maintaining several git trees where a
single patch can be over 1GB in size (I know this is crazy, but this
actually happens). When spam crawlers access such patch over /commit
links, this generates a colorized version that is easily 10GB in size in
the cache dir. A couple of such hits and my cgit cache partition runs
out of space.

There is currently no way to tweak cgit cache based on object size, only
on the number of entries, so there is really no way to fix this beyond a
kludge of running cron every 5 minutes that deletes all objects larger
than 1GB in the cgit-cache dir.

I'd be happy to see a config option that either limits total size of
cgit-cache (preferred) or at least tells cgit not to cache objects
larger than a certain size.

Best,
-- 
Konstantin Ryabitsev
Linux Foundation Collab Projects
Montréal, Québec
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20161010/d65a5b5e/attachment.asc>


More information about the CGit mailing list