RE: [SQU] Caching and Request Headers.

From: William Wishon <bill.wishon@dont-contact.us>
Date: Tue, 12 Dec 2000 15:04:21 -0800

If squid were to support the Vary header then I could use it to say that my
responses to a particular URL vary with the User-Agent header, for instance.
Right? Anyway that is how I read what the Vary header is intended for.
But, unfortunately the squid docs say that it doesn't yet support the Vary
header. Do you have any suggestions about what to read next (after rfc
2616) and where to look into the squid code to add this functionality? I'll
be grep'ing around the source code to try and figure out where that would go
myself, but any suggestions are appreciated.

Thanks,
Bill

-----Original Message-----
From: Alex Rousskov [mailto:rousskov@measurement-factory.com]
Sent: Tuesday, December 12, 2000 2:29 PM
To: William Wishon
Cc: squid-users@ircache.net
Subject: Re: [SQU] Caching and Request Headers.

On Tue, 12 Dec 2000, William Wishon wrote:

> Does squid cache requests based on the hash of the entire header or just
the
> url?

Neither, to be precise.

> The reason I am asking is that I want to use squid as an accelerator for a
> slow server, but that slow server reads the http request headers and
returns
> different content based on the Browser type and other http header fields.
> If Squid only cached based on the url then if the first user to hit a
> particular url was using Netscape and squid cached the result, then
another
> user comes in using IE he would get the cached url which is a Netscape
page
> not an IE page.

If your server emits appropriate HTTP response headers (such as
"Vary"), then Squid will not treat same-URL pages as same-content
pages. IIRC, Squid will not cache content that depends on the headers
(but the headers must tell Squid that the content depends on them!).

You may want to read RFC 2616 for details.

Whether not caching variable content is good for your purposes is
impossible to say. If it is a problem, you can, at your option, to
design the Web site so that URLs differ for different content. Such an
approach, while not perfect, will protect you from client-side caches
that cache based on URL only.

$0.02,

Alex.

--
To unsubscribe, see http://www.squid-cache.org/mailing-lists.html
Received on Tue Dec 12 2000 - 16:09:26 MST

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