Re: [SQU] Caching and Request Headers.

From: Alex Rousskov <[email protected]>
Date: Tue, 12 Dec 2000 15:28:46 -0700 (MST)

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 - 15:31:12 MST

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