RE: Caching dynamic content

From: Robert Collins <robert.collins@dont-contact.us>
Date: Mon, 6 Nov 2000 09:47:15 +1100

Please see my response in the body of the email
> -----Original Message-----
> From: Jochen Dolze [mailto:dolze@epcnet.de]
> Sent: Sunday, 29 October 2000 4:53 AM
> To: squid-dev@squid-cache.org
> Subject: Caching dynamic content
>
>
> Hi,
>
> we are trying to cache dynamic content with squid-2.3stable. Our own
> scripting-language is able to produce Last-Modified and ETag-Headers.
>
> A reply from the server contains e.g.:
>
> Last-Modified: Fri, 18 Aug 2000 13:14:58 GMT
> ETag: "0-1cca-399d36d2"
> Content-Length: 8135
>
> It works fine with certain different URLs!
>
> Are these two contents different for squid, or is squid only
> taking the URL
> to identify different pages?:
>
> http://web.test.com/file.html?var=1
>
> Last-Modified: Fri, 18 Aug 2000 13:14:58 GMT
> Content-Encoding: gzip
> ETag: "0-2345-34232425"
> Content-Length: 3112
>
> http://web.test.com/file.html?var=1
>
> Last-Modified: Fri, 18 Aug 2000 13:14:58 GMT
> ETag: "0-2345-34232425"
> Content-Length: 7135
>
> In my case, MSIE5.5 got with squid the wrong cached object!!!
> Must i use
> different ETags for compressed/uncompressed content?

You should use Content-Encoding or Transfer-Encoding for
compressed/uncompressed content. Etags provide a mechanism to validate
that the body in the cache is the same body available upstream or from
the origin server.

> One URL can produce hundred different pages of content.
The query part of a URL is part of the test for equivalence under HTTP
rules.

so http://web.test.com/file.html?var=2 and
http://web.test.com/file.html?var=24 are different URL's. And E-Tags and
Modified dates should not be compared (and AFAIK squid will not and
cannot compare) between them. (NB: there is one near exception: the
Location tag will allow a second object to be expired or updated at the
same time... a use for this would be to return a ? driven page and
inform the cache and the browser that there is a static /second
reference for the same content).

>Does
> squid take care
> of this? Must i produce different ETags or MD5-Headers for each file?
>
> http://web.test.com/file.html?var=2
> http://web.test.com/file.html?var=24
> http://web.test.com/file.html?var=536
> ...
>
Each URI above should be considered different by Squid. I suggest you
look in the source tree at docs/debug-sections.txt and turn up the
debugging information for cache hit/miss comparisons and then run your
test cache with IE.

> How does squid determine different content?
I believe that is in the FAQ.

Rob

>
> Thanks
>
> Jochen Dolze
>
> ---
> EPCNet GmbH
> ISP & Web Design
> Bleichstrasse 24
> 89077 Ulm
> Tel. 0731-1416 0
> Fax 0731-1416-120
>
Received on Sun Nov 05 2000 - 15:49:07 MST

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