[PATCH 2/2] Add a cache-snapshot-ttl configuration variable
Jason A. Donenfeld
Jason at zx2c4.com
Wed Feb 5 15:44:36 CET 2014
On Wed, Feb 5, 2014 at 10:46 AM, Lukas Fleischer <cgit at cryptocrack.de> wrote:
> This can be used to specify the TTL for snapshots. Snapshots are usually
> static and do not ever change. On the other hand, tarball generation is
> CPU intensive.
> One use case of this setting (apart from increasing the lifetime of
> snapshot cache slots) is caching of snapshots while disabling the cache
> for static/dynamic HTML pages (by setting TTL to zero for everything
> except for snapshot requests).
I like this idea. But I don't think the default should be -1, since
that significantly changes the current behavior, and makes certain
tarballs get out of date perpetually, like downloading a zip of HEAD
or what happens when history is rewritten.
Currently it defaults to cache_repo_ttl, which is 5. I'd be willing to
compromise for 15 if you prefer.
More information about the CGit