Re: Squid and apache

From: Dancer <dancer@dont-contact.us>
Date: Thu, 09 Sep 1999 07:44:21 +1000

squid wrote:
>
> Hi, guys!
>
> Seems to me that after no refresh_patern entry in squid.conf some pages on
> an apache server are cached and not expire, even if a new page exist.
>
> You can try this. Is the Squid fault or apache fault or man fault (they
> don't put a no-cache in headers).
>
> Thanks in advance!
>
> Catalin BOIE

Here's a trick you can do at home:

Go to your apache webserver. Chmod a file to 000.
Request it through squid.
It fails. Not a surprise.
Chmod the file back to it's regular permissions.
Now, depending on which version of squid you have, you will either:

a) Not be able to get the file for five minutes (correct behaviour) or
b) Not be able to get the file at all.

Why (b)?

Because in some versions the failure got more permanently cached than
the five minute negative caching time. So, squid sends an IMS request.
Apache looks at the timestamp on the FILE (which hasn't changed) and
says 'No...it's still the same'. And so on....until the cached object is
purged by LRU or manually, you cannot get it.

There are other situations I've encountered (restore from backup, among
others) where the last-modified-time on an object goes backwards, and
the object (served by apache) cannot be reloaded through squid (for
exactly the same reason. IMS in apache says it hasn't changed).

There seem to be other circumstances under which apache might claim a
file remains unchanged. I'm not quite sure what they are though.

Try touching (man touch) the files at the webserver before reloading
them.

D
Received on Wed Sep 08 1999 - 16:00:50 MDT

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