From: Robert Fitzsimons Date: Thu, 21 Dec 2006 03:22:16 GMT Subject: Re: [RFC] gitweb wishlist and TODO list (part 1) Message-ID: <20061221032216.GF17864@localhost> In-Reply-To: <200612170000.06771.jnareb@gmail.com> > * 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 . CacheDefaultExpire 60 CacheIgnoreCacheControl On CacheIgnoreNoLastMod On CacheEnable mem /git/ MCacheSize 8192 MCacheMinObjectSize 512 MCacheMaxObjectSize 128000 MCacheRemovalAlgorithm LRU 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. ExpiresActive On ExpiresDefault "access plus 1 minutes" ... 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