List for cgit developers and users
 help / color / mirror / Atom feed
From: mricon at kernel.org (Konstantin Ryabitsev)
Subject: RFC: don't cache objects larger than X
Date: Mon, 10 Oct 2016 10:03:12 -0400	[thread overview]
Message-ID: <20161010140312.GB2142@gmail.com> (raw)

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>


             reply	other threads:[~2016-10-10 14:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-10 14:03 mricon [this message]
2016-10-12 11:22 ` Jason
2016-10-12 13:05   ` mricon
2016-10-17 17:56   ` lfleischer
2016-10-17 18:39     ` Jason

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161010140312.GB2142@gmail.com \
    --to=cgit@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).