> > What is the right way to tell squid to forget its cache and reload a fresh
> > copy from the source?
>
> From your email it looks like the Squid server is intentionally configured
> to ignore reload requests.
I double-checked my refresh_pattern, which says:
,-----
| # 3 * 24 * 60 = 4320, 5 * 24 * 60 = 7200
| refresh_pattern . 4320 60% 7200
`-----
As you can see, no reload-into-ims or ignore-reload is set.
Doing a diff with the original .conf, I noticed the only reason
might be that I've turned the offline mode on:
,-----
| # Enable this option and Squid will never try to validate cached
| # objects.
| #
| #Default:
| # offline_mode off
| offline_mode on
`-----
Is it the culprit? Oh, I'm too curious to give it a try...
YES, that's it! (*1)
I think this should be called a bug, not a feature. Squid should
still honor the 'Pragma: no-cache' request even in offline mode.
For this will be the only way to refresh a cached page in offline
mode.
I took the liberty to send a copy to
squid-bugs@squid-cache.org. Hope it will not bounced back to me.
Thanks
Tong.
PS.
Relevant info for Squid bug report:
# Squid version: squid-2.4.STABLE7, Vendor: Red Hat, Inc.
# Operating System: RH8, with kernel upgraded
$ cat /proc/version
Linux version 2.4.20-20.8 (bhcompile@daffy.perf.redhat.com) (gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7)) #1 Mon Aug 18 14:39:22 EDT 2003
Note:
*1: After disabling the (only) offline_mode, it works now:
$ client -rv http://localhost/~tong/test/
headers: 'GET http://localhost/~tong/test/ HTTP/1.0
Pragma: no-cache
Accept: */*
'
HTTP/1.0 200 OK
Date: Tue, 25 Nov 2003 15:20:47 GMT
Server: Apache/2.0.40 (Red Hat Linux)
Content-Length: 1182
Content-Type: text/html; charset=ISO-8859-1
X-Cache: MISS from xpt
Proxy-Connection: close
The previous respond was:
$ client -vr http://localhost/~tong/test/
headers: 'GET http://localhost/~tong/test/ HTTP/1.0
Pragma: no-cache
Accept: */*
'
HTTP/1.0 200 OK
Date: Tue, 25 Nov 2003 01:28:40 GMT
Server: Apache/2.0.40 (Red Hat Linux)
Content-Length: 854
Content-Type: text/html; charset=ISO-8859-1
Age: 740
X-Cache: HIT from xpt
Proxy-Connection: close
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
[...]
The page was still an old copy.
Received on Tue Nov 25 2003 - 08:42:04 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:21:35 MST