RFC: don't cache objects larger than X

Konstantin Ryabitsev mricon at kernel.org
Wed Oct 12 15:05:54 CEST 2016

On Wed, Oct 12, 2016 at 01:22:34PM +0200, Jason A. Donenfeld wrote:
> I face this same problem, in fact. Unless somebody beats me to it, I'd
> be interested in giving this a stab.
> One issue is that cache entries are currently "streamed" into the
> cache files, as they're produced. It's not trivially possible to know
> how big it's going to be beforehand. This means that the best we could
> do would be to just immediately unlink it after creation and printing.
> Would this be acceptable?

Is there any way of keeping track of how much was written? It seems like
it should be pretty simple to continuously check how much has been
written to the cache and abort writing if the cache file grows larger
than the configured maximum?

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/20161012/9b93db7c/attachment.asc>

More information about the CGit mailing list