git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robert Fitzsimons <robfitz@273k.net>
To: Jakub Narebski <jnareb@gmail.com>
Cc: git@vger.kernel.org, Kernel Org Admin <ftpadmin@kernel.org>,
	Petr Baudis <pasky@suse.cz>
Subject: Re: [RFC] gitweb wishlist and TODO list (part 1)
Date: Thu, 21 Dec 2006 03:22:16 +0000	[thread overview]
Message-ID: <20061221032216.GF17864@localhost> (raw)
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 .

<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

  parent reply	other threads:[~2006-12-21  3:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-16 23:00 [RFC] gitweb wishlist and TODO list (part 1) Jakub Narebski
2006-12-17  1:47 ` Junio C Hamano
2006-12-21  3:22 ` Robert Fitzsimons [this message]
2006-12-21  9:18   ` Jakub Narebski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061221032216.GF17864@localhost \
    --to=robfitz@273k.net \
    --cc=ftpadmin@kernel.org \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.com \
    --cc=pasky@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).