[PATCH] hgweb: support disabling page cache

Benoît Allard benoit at aeteurope.nl
Thu Apr 21 02:45:25 CDT 2011


Steven Stallion wrote:
> On Wed, Apr 20, 2011 at 10:57 AM, Matt Mackall <mpm at selenic.com> wrote:
>> On Wed, 2011-04-20 at 04:02 +0000, Steven Stallion wrote:
>>> # HG changeset patch
>>> # User Steven Stallion <sstallion at gmail.com>
>>> # Date 1303272110 14400
>>> # Node ID 09c1266b7d19ac58bdef198965d44677c4021fa3
>>> # Parent  94dbe11c15c38cdf7427079035cd83417636f3db
>>> hgweb: support disabling page cache
>>>
>>> By default, hgweb_mod supports caching via the ETag header. This can
>>> cause some confusion with browsers which cache aggressively.
>> "Confusion" sounds like a bug, please elaborate.
> 
> Certainly.
> 
> At our installation we have a class of users which tend to keep a
> browser tab open and simply refresh looking for changes to
> repositories. They expect to see the age of commits change on each
> refresh, even if there have been no changes to the actual content. I
> don't think this is a bug (at least I've seen nothing to suggest that
> so far), its just a usability tweak to keep others from derailing me
> every couple of days. I've seen something similar myself, having made
> a push the night before and refreshing a window after a day or so.
> 

Another solution that comes to mind would be to calculate the elapsed 
time in javascript. That way, the content of the page is always the same 
and can be safely cached.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 6370 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20110421/32583d42/attachment.bin>


More information about the Mercurial-devel mailing list