Re: [PATCH] gitweb: Supporting caches (was: Adding a `blame' interface.)
- From
- Florian Forster <octo@verplant.org>
- Date
- Jun 12, 2006, 17:57 UTC
- Message-ID
- <20060612175735.GA13432@verplant.org>
- In-Reply-To
- <Pine.LNX.4.64.0606120754460.5498@g5.osdl.org>
On Mon, Jun 12, 2006 at 07:59:39AM -0700, Linus Torvalds wrote:
> The apache setup at least on kernel.org is already set up to do > caching, as long as the generated headers for the page allow it in the > first place.
I've actually looked into improving native HTTP caching (mostly for small site without revers proxying) by providing a `Last-Modified' header where possible and sending a `304 Not Modified' whenever appropriate.
While it doesn't sound hard it's next to impossible: A commit's timestamp doesn't change when head a points to it (or does not longer point to it). Also displaying the timestamps as `Modified xy {seconds,minutes, hours,...} ago' possess a big problem.
(I guess the webserver could use the `If-Modified-Since' header to check if the displayed time needs to be updated, but if you ask me it's not worth the effort.)
In short, the `blob', `blob_plain', and `blobdiff' pages could profit from that because they don't display the head(s) pointing to the current commit. On the other hand, this is a little inconsistent and could be considered a bug. So I'll give up on that unless someone has a great idea how to handle this.
Regards, -octo
-- Florian octo Forster Hacker in training GnuPG: 0x91523C3D http://verplant.org/