git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC] gitweb wishlist and TODO list (part 1)

From
RFRobert Fitzsimons <robfitz@273k.net>
Date
Dec 21, 2006, 03:22 UTC
Message-ID
<20061221032216.GF17864@localhost>
In-Reply-To
<200612170000.06771.jnareb@gmail.com>
Show 6 quoted lines
> * Cache validation and infinite cache for unchanging pages
> 
>   By itself cache validation would not bring much performance boost (for
>   gitweb installations with large traffic), but with the reverse proxy,
>   aka. caching engine, aka. HTTP accelerator in front of server this could
>   help a lot.

There is no need for extra servers to provide server side caching. Apache2 includes suitable modules (mod_cache) which can be configured to cache in memory or disk the pages generated by gitweb.

For example the following apache2.conf entry will setup a 8MB mem cache which will return cached pages even if the user tries to force a refresh in their browser. The details are covered in the apache documentation http://httpd.apache.org/docs/2.2/caching.html .

<IfModule mod_cache.c>
	CacheDefaultExpire 60
	CacheIgnoreCacheControl On
	CacheIgnoreNoLastMod On
	<IfModule mod_mem_cache.c>
		CacheEnable mem /git/
		MCacheSize 8192
		MCacheMinObjectSize 512
		MCacheMaxObjectSize 128000
		MCacheRemovalAlgorithm LRU
	</IfModule>
</IfModule>

mod_cache will only cache pages with a query string in the url if they have an expires header. So we can put a temporary hack in using mod_expires until gitweb sets an appropriate value.

<Location /git/>
	ExpiresActive On
	ExpiresDefault "access plus 1 minutes"
	...
</Location>

Also the content type would need to be change to just return text/html or MSIE will do the wrong think if it's given a application/xhtml+xml page.

Robert
Previous: Junio C HamanoNext: Jakub Narebski
Message 3 of 4 in “[RFC] gitweb wishlist and TODO list (part 1)”
  1. Jakub NarebskiDec 16, 2006
  2. Junio C HamanoDec 17, 2006
  3. Robert FitzsimonsDec 21, 2006
  4. Jakub NarebskiDec 21, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.