Re: [squid-users] Http accelerator questions (apologies if you have received this already)

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Tue, 16 Oct 2001 23:23:54 +0200

D.Singerman@mgn.co.uk wrote:

> Problem 1) As I am only using Squid as an accelerator, dedicated to
> one application, I want to have total control over when objects get
> served from the cache, and when they don't - i.e. I don't want a
> browser refresh/reload to cause a hit on the accelerated server. In
> IE5.5 on the PC this isn't a problem (I think because refresh dosn't
> work properly). However on Netscape (6.0) I am having the following
> problem - On a shift-refresh, the browser sends a http cache-control
> no-cache header. I have successfully disabled this with ignore-reload
> in the refresh_pattern config - this works fine. However if a netscape
> user presses just refresh (no shift), this sends a http cache-control
> max-age=0 header, and this always seems to cause a TCP_MISS/200 no
> matter what I try. Help|

The *reload* hacks in Squid only looks for "Pragma: no-cache". The other
methods are unaffected.

This is mostly a matter of getting them implemented. As these are
violations to the HTTP standard for proxies the task of implementing
such tweaks is not given a very high priority by most of the current
developers on their free time.

> Problem 2) I only want to expire objects from the cache when the
> application decides they have been updated, so I want to do this
> programatically. That's fine, however to keep things in cache until I
> directly purge it (I think) I have to send a http expire header far in
> the future (say 10 days). However I want squid to serve an expires now
> header to any browsers, so browsers will always check the squid cache
> for the latest version (and not wait 10 days). Does anyone know if
> this is possible?

Have your server send a reasonably short Expires (but not immediately..
make it at least a couple of minutes). Then use refresh_pattern to
override this in the accelerator.

Regards
Henrik Nordström
Squid Hacker
Received on Tue Oct 16 2001 - 15:22:24 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:02:47 MST