Re: [squid-users] Caching Expired Objects

From: Henrik Nordstrom <henrik@dont-contact.us>
Date: Wed, 26 Sep 2007 10:01:30 +0200

On mån, 2007-09-24 at 07:42 -0700, zulkarnain wrote:
> I'm having the same problem, any solution to handle
> this? thanks!

Solution:

0. Make sure the cache directive has been disabled. The distributed
configuration file blocks caching of URLs with ? or cgi-bin in them..

1. Understand why the object is not getting cached. This requires
inspecting the HTTP headers looking for Cache-Control, Authorization and
Pragma headers.. You can get access to the header details by enabling
log_mime_hdrs in squid.conf (default off to protect users privacy).
Also taking a close look at the URL is worthwhile as quite often there
is unique identifiers in the URL changing for each request, making the
URL unique.. to get access to query parameters disable strip_query_terms
in squid.conf (default on to protect users privacy).

2. If the URL is static and it's just HTTP headers which prevents the
object from being cached then override those reasons with suitable
refresh_pattern settings. Or talk with the site owner and have them read
http://www.mnot.net/cache_docs/

3. If the URL is dynamic with some unique identifier it's more complex.
May work stripping out the unique identifier using an url rewriter (see
url_rewrite_program) but not guaranteed. Or talk with the site owner and
have them read http://www.mnot.net/cache_docs/

Regards
Henrik

Received on Wed Sep 26 2007 - 02:01:36 MDT

This archive was generated by hypermail pre-2.1.9 : Mon Oct 01 2007 - 12:00:03 MDT