Re: [squid-users] Is ESI cached?

From: Robert Collins <robertc@dont-contact.us>
Date: Sat, 23 Aug 2003 06:57:54 +1000

On Fri, 2003-08-22 at 23:08, Gianugo Rabellino wrote:
> I'm testing the CVS version with ESI (very promising work indeed, thanks
> for that!), but I'm running through an troublesome issue: I expected ESI
> resources to be cached by Squid as any other ones (what would be the
> point if that wasn't the case?), but all my tests are failing with cache
> miss all over the place.
>
> On http://www.esi.org/architecture_spec_1-0.html I read that ESI
> processors should disregard the Cache-Control headers and rely on
> Surrogate-Control instead (does that stand true for included resources
> as well?).

Yes.

> I did a quick setup with a stock Apache configured as follows:
>
> <Directory /esi/>
> Header add Surrogate-Control max-age=60,content="ESI/1.0"
> ExpiresActive On
> ExpiresByType text/html "now plus 1 minutes"
> </Directory>
>
> Which sends, as expected, what seems to me a proper Surrogate-Control
> header. The ESI processor works just fine on this very simple test:
>
> <html xmlns:esi="http://www.edge-delivery.org/esi/1.0">
> <head>
> <title>ESI Test</title>
> </head>
> <body>
> <p>The following content should be pulled automagically.</p>
> <esi:try>
> <esi:attempt>
> <esi:include src="http://localhost/esi/included.html"/>
> </esi:attempt>
> <esi:except>
> Unable to retrieve content.
> </esi:except>
> </esi:try>
> </body>
> </html>
>
> With the only (notable) exception that, despite the "max-age" given in
> the headers, all I get are cache misses from Squid and, from my web
> server logs, hits to both resources (the above page and
> esi/included.html) for each squid request. Given also that processing
> time with ESI is quite huge (average of 450ms for the above setup), not
> being able to cache the results might be a serious showstopper. Have I
> overlooked something?

Hmm. Several things there. I've tested ESI at 500+ request per second
rates, for similar test pages - and they are all hits. 450ms sounds like
a serious problem. Probably most of that is waiting for your source
pages, if they aren't being cached.

Try these one-at-a-time:
Have you set a surrogate-id in squid.conf ?
Try setting the max-age a little higher - say 120. If that 'fixes' the
problem, it's a regression and I know where it will be.
Up your debug level to All,1 90,2. That will spit out any SC parsing
errors.

HTH,
Rob

-- 
GPG key available at: <http://members.aardvark.net.au/lifeless/keys.txt>.

Received on Fri Aug 22 2003 - 15:01:05 MDT

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