Re: This object is updated, how come Squid doesn't not this?

From: Jonathan Larmour <JLarmour@dont-contact.us>
Date: Wed, 09 Jul 1997 21:59:11 +0100

At 22:19 09/07/97 +0200, Gerben Wierda wrote:
>I have a CERN httpd running locally. I also have a squid cache running.
>When I updated a .gif file, it turns out squid is constantly giving me the
>one from the cache, not the one from the local server:
>
>868436745.836 79 192.168.1.1 TCP_HIT/200 4115 GET
>http://awt.nl/images/wierda-background.gif - NONE/- image/gif
>
>Squid notices a TCP-HIT, but the file *is* modified. What is going wrong?
>When I connect directly to httpd, I get the new file allright, so it is
>squid that seems in the wrong.

I suspect you believe squid should always work in the same way as the CERN
proxy (since you have the httpd, you may have used it as a proxy). The idea
behind squid caching is to return objects that _probably_ haven't changed.
Sometimes this works, sometimes it doesn't. Have a look in the doc
directory, or the FAQ for how the decision is made as to whether an object
can still be returned or not. It uses things like the last modified time or
an expiry header (if available) to decide, along with some settings you
provide in squid.conf.

If you really want to ensure you fetch the latest version of the object
every time, then look at the refresh_pattern command in squid.conf. With
this you can ensure that an If-Modified-Since request is produced every
time. The drawback is that you always have to go to the original site to
check this - although, if it hasn't changed, you won't need to fetch the
whole object again.

Read the contents of the doc/ directory, the FAQ, and the comments in
squid.conf.

Jonathan L.

Origin UK,323 Cambridge Science Park,Cambridge,England. Tel: +44(1223)423355
------[ Do not think that every sad-eyed woman has loved and lost... ]------
April 12th! Ra!Ra!----[ she may have got him. -Anon ]-----April 12th! Ra!Ra!
Help fight spam! http://spam.abuse.net/ These opinions are all my own fault
Received on Wed Jul 09 1997 - 14:07:28 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:35:42 MST