From: Jakub Narebski Date: Mon, 14 Jul 2008 23:14:43 GMT Subject: Re: [PATCH 3/3] gitweb: use new Git::Repo API, and add optional caching Message-ID: <200807150114.44402.jnareb@gmail.com> In-Reply-To: <487BDB34.7010002@gmail.com> Lea Wiemann wrote: > Jakub Narebski wrote: > > Note that if caching is enabled, you can set expires to either > > time-to-expire of cache entries (simpler), or time left to live to > > invalidation of item in cache (better, but more complicated) > > Gitweb's cache is actually never out-of-date, and cache invalidation > happens automatically.  It uses some (long) expiry times to guard > against non-standard modification of the repository, but it's nothing > the HTTP client should be concerned with. Could you explain then how gitweb cache is invalidated? The _reasoning_ behind setting Expires:/Cache-Control: max-age= header for gitweb with caching is that browser doesn't need to even try to cache-validate or access page for the time we *know* that output would not change[*1*] because it is from the cache. [*1*] In significant way: changing relative dates/time doesn't count. -- Jakub Narebski Poland