httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Richards <p.richa...@elsevier.co.uk>
Subject Re: proxying
Date Tue, 23 Jan 1996 10:28:10 GMT
In reply to Alexei Kosut who said
> 
> On Mon, 22 Jan 1996, Paul Richards wrote:
> 
> > I'd like to see something analagous to the way DNS caching works, where
> > the web authors would have control of the timeout's on a particular page
> > and the cache would have to honour that and reload from the original
> > when the timeout expires.
> 
> Well, what the CERN server, and my proxy module (which I based for the
> most part on CERN's behavior), is to expire files (ones without Expire
> headers) after one tenth their staleness, based on the Last-Modified date.
> So, for example, if a file was modified twenty days ago when it was
> gotten, it will expire in two days, if it was modified ten minutes ago,
> it'll expire in one.

Hmm, those are reasonable heuristics to use in the absense of a proper
protocol. It doesn't change the fact that http is missing this functionality
in a properly formulated manner.

If an enforced timeout was available you could do things like, set a long
timeout on static pages, then when you want to actually change them you can
first, drop the timeout to something quite small, after doing this wait for
a time equal to the previous long timeout. At this point you are guaranteed
that all caching servers will have picked up the page at least once and will
now be using the new timeout value. You can now make your change to the file
and have it propagated quickly and then up the timeout to the old value again.
This process guarantees that the cached pages are never out of sync with
the master copy for more than a short period of time. It really concerns me
that there's no way to prevent incorrect (i.e. stale) data from being
served from caches.

This is of course a DNS trick, I do like the DNS model :-)

Anyway, it's not really an issue for Apache since it would require a change
to the http spec.

-- 
  Paul Richards. Originative Solutions Ltd.
  Internet: paul@netcraft.co.uk, http://www.netcraft.co.uk
  Phone: 0370 462071 (Mobile), +44 1225 447500 (work)

Mime
View raw message