[PATCH] hgweb: support disabling page cache

Martin Geisler mg at lazybytes.net
Thu Apr 21 03:33:13 CDT 2011


Benoît Allard <benoit at aeteurope.nl> writes:

> 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.

Heh, that is much more elegant than the server-side solution I just
outlined!

-- 
Martin Geisler

Mercurial links: http://mercurial.ch/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20110421/1ef1927b/attachment.pgp>


More information about the Mercurial-devel mailing list