Re: [squid-users] NEWBIE: force squid to store/cache xml responses?

From: AJ Weber <aweber_at_comcast.net>
Date: Fri, 13 Aug 2010 09:26:14 -0400

I used lynx to get the headers of the content from the origin server and the
squid cache.

Neither provides a Cache-Control or an Expires header at all. I'm going to
look into Tomcat settings, but unsure whether I'll find anything there.

However, I tried -- just to see the affect -- enabling "act-as-origin" on
Squid to see if it would add any caching/expires info so the actual client
would maybe cache the content too. It changed the Date: header to the
current date/time (instead of when the content got cached on the Squid
proxy), but did not add any Cache-Control or Expires info. Is that right?
I thought that's what the documentation in the sample .conf file says it
does?

-AJ

----- Original Message -----
From: "Amos Jeffries" <squid3_at_treenet.co.nz>
To: <squid-users_at_squid-cache.org>
Sent: Wednesday, August 11, 2010 10:12 PM
Subject: Re: [squid-users] NEWBIE: force squid to store/cache xml responses?

> On Wed, 11 Aug 2010 15:32:21 -0400, "AJ Weber" <aweber_at_comcast.net> wrote:
>> I have a specialized case where there are some xml config files that are
>
>> static -- not returning dynamic info like an rss feed or something.
>
> The there is a problem on the web server sending the wrong Cache-Control:
> and/or Expires: headers.
>
> The best fix is to correct the problem at the source cause. Any hack you
> configure in your Squid will only affect that one install of Squid not the
> thousands of other proxies around the Internet or the client software
> which
> has to deal with the objects on arrival.
>
>>
>> I tried forcing squid 2.7 to cache these (accelerator mode), but can't
>> seem
>> to get it to work.
>>
>> Currently I'm trying:
>> refresh_pattern -i \.xml$ 2880 80% 14400 override-expire
>> override-lastmod ignore-no-cache ignore-private ignore-reload
>>
>> This is the first refresh pattern and should match. for example these
> are
>> the entries in the store.log...
>> 1281553624.015 RELEASE -1 FFFFFFFF 2C3544E359642CCE8719931EEC59536B 304
>
>> 1281553620 1225808485 -1 text/plain -1/0 GET
>> http://test.test.com/crossdomain.xml
>> 1281553664.484 RELEASE -1 FFFFFFFF 9511A5DBA70C624E5DD76FE143AFB909 304
>
>> 1281553620 1225808485 -1 text/plain -1/0 GET
>> http://test.test.com/crossdomain.xml
>> 1281554349.390 RELEASE -1 FFFFFFFF 4DBBD82F76E56E6B938A65898ABC3EDD 304
>
>> 1281553620 1225808485 -1 text/plain -1/0 GET
>> http://test.test.com/crossdomain.xml
>> 1281554413.359 RELEASE -1 FFFFFFFF 8B0D827E31D1D5725CD1EFB828EB9C67 304
>
>> 1281553620 1225808485 -1 text/plain -1/0 GET
>> http://test.test.com/crossdomain.xml
>>
>> I changed the servername here "to protect the innocent".
>>
>> If I understand the log correctly, it seems like there is not an expires
>
>> header that is parsable, but shouldn't this be ignored given my
>> refresh_pattern options???
>
> Look at what redbot.org says about the cache-control and expiry headers.
> There are likely other things not being overridden. It's annoyingly common
> for people to set these overrides on individual proxies, forcing web admin
> to set an ever increasing number of alternative forced non-caching rules
> on
> important short-lived objects.
>
> And note, that override will force-cache *every* .xml object stored by
> your Squid. Regardless of source, whether its a RSS feed or a facebook
> game
> state update etc. Only allowing them to fetch new versions once per ten
> days.
>
> Amos
>
Received on Fri Aug 13 2010 - 13:26:19 MDT

This archive was generated by hypermail 2.2.0 : Fri Aug 13 2010 - 12:00:02 MDT