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: cache verification
Date Tue, 05 Mar 1996 08:46:52 GMT

> Currently, your proxy server gets a document, then caches it. If it gets 
> another request for the document, and the Expires: date on the cached 
> document (either explicit or implicit) has not passed, it returns the 
> cached copy. As I've pointed out before, this is very often not the 
> desired behavior. The desired behavior in many cases is to always send a
> conditional GET request to the origin server and check to see if the file 
> has changed before returning the cached copy.
> 
> This is (someone correct me if I'm wrong) every other proxy server on the
> planet does it, for the most part, with some changes here and there. (I
> know Brian mentioned that the AOL proxy keeps images for six hours without
> checking, for example). IMO, and I've said this before, this should be the
> default behavior of our server. It can be turned off if you want (with
> CERN httpd and with my ill-fated Apache proxy module, you could), but
> users will become quite irate if they keep getting old copies of documents
> without any inclination of why. 

This is a bit like the discussion I raised, I think there's some difference
between proxying and caching and the www community isn't really sure yet
what the normal behaviour is.

My take is that a cache only checks the original source when the ttl for the
item times out, for web pages this will be the Expire header. A proxy is 
something you connect to that's closer (or more accessible) than the
target server. Of course for Web servers a proxy needs to cache or it's
not working in the way that www proxy servers are expected to work.

I think any piece of software that uses caching should adhere to the ttl value
used in the implementation, in this case Expire and if users are getting out
of date documents it's the fault of the person who wrote those documents
because they didn't drop the Expire header, wait the Expire duration for all
caches to time out and then put up the new document. That's how it *should*
work and I think Apache should aim to try and move the community into doing
things properly whenever it can. I don't see why the caching proxying behaviour
can't be configurable though so that if you want this alternative behaviour
you can have it.

You might want to consider the target site though, the whole point of
setting Expire headers is to reduce your net traffic and it's not good
practice to keep hitting the target sites even if you don't end up downloading
the whole document each time.


Mime
View raw message