Re: [squid-users] ETag support for html files

From: Henrik Nordstrom <henrik@dont-contact.us>
Date: Fri, 02 Jun 2006 11:10:41 +0200

tor 2006-06-01 klockan 13:43 -0400 skrev sknipe@tucows.com:

> However, our html pages may change in the expires time
> frame.

Then you need to advertise a smaller expires interval or use
"Cache-Control: max-age=XXX" to tell caches they must validate the
page..

> Perhaps a better model for us is more of an update based
> model using ETag. The down side of this is that our
> infrastructure is hit for each request. However, the hit
> is minimal if the html page has not changed.

In this scenario ETag just allows for a stronger "If-Modified-Since". In
terms of caching of simple responses (no Vary) there is not much
difference if you use the ETag or Last-Modified. And with both you need
to set freshness appropriately to have the page revalidated with the
frequency you need.

> Also, I noticed that Squid forces http communication into
> http 1.0 mode. This has a negative effect when working
> with IE and the ETag model. Can we have Squid interact in
> http 1.1?

Can you please elaborate on what negative effects is seen with IE here..

> For the image, css and js files, we have a requirement to
> check if users are authorized to files before they are
> serviced. Therefore, once cached in Squid they are
> serviced by Squid and do not interface with our
> infrastructure. Is there a mechanism in Squid to enable
> the appropriate authorization checks before servicing?

"Cache-Control: s-maxage=0" forces shared caches to revalidate the
request with the origin server on every request.

Please note that there generally is not much benefit to cache smallish
objects (<10KB or so) which needs to be revalidated. The main benefit of
caching small objects is the latency improvements, and these are almost
completely lost if the object needs to be revalidated..

Regards
Henrik

Received on Fri Jun 02 2006 - 03:10:49 MDT

This archive was generated by hypermail pre-2.1.9 : Sat Jul 01 2006 - 12:00:01 MDT