Hi Holger,
On Mon, Sep 04, 2017 at 10:02:43PM +0200, Holger Freyther wrote:
we had enabled snapshots as some of "our" Osmocom developers wanted the feature. And some people continue to clone the website (as if cloning a git repository couldn't be done easier).
thanks for pointing this out. I'll make a comment in the config file about this.
On my todays flight I came up with a solution but will only implement it the next days (unless someone else is doing it).
- disable caching in cgit
- enable caching inside the cgit nginx for the majority of URLs. Luckily
with git the rendering of a specific commit will not change...
it changes, there's a small grey timestamp at the bottom of each html page (unless the page is raw). I had to figure this out when finding URLs that I could use to reliably invalidate the Docker cachen once a given branch of a repo changes. See e.g. line 20 of http://git.osmocom.org/docker-playground/tree/osmo-ggsn-master/Dockerfile#n2...
So yes, most users probably won't care if the timestam at the bottom of the html pages is wrong.
Please make sure though that URLS referring to specific branch HEADS are not cached though, such as http://git.osmocom.org/openggsn/patch/?h=laforge/osmo-ggsn as those are used from the Dockerfiles to detect if the HEAD of the given branch has changed or not.
what do you think?
First: Thanks for looking into this! I think I would still prefer a patch to cgit. Limiting either the size of individual cached objects, or having a soft limit on total size of the cache should be generally useful features for upstream, not just for us. But yes, it doesn't look like a trivial way given how they implement the cache. Maybe the maintainers have an idea about this?
But then, up to you!