Re: [squid-users] Accelerating proxy not matching cgi files

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Fri, 26 Aug 2011 02:44:30 +1200

On 26/08/11 01:59, Mateusz Buc wrote:
> 2011/8/25 Mateusz Buc wrote:
>>
>> However, I still can't make these URLs/images cached on my squid. Is
>> there any chance they can be served directly from squid cache when
>> they do not change? Right now I have reduced network bandwidth
>> obviously, but not sure about CPU load - it still takes almost the
>> same time to load URL (about 8 seconds).
>>
>
> Ok, I've quite figured it out. The solution was to add 'ignore-cc' to
> http_port option. Right now I'm getting TCP_IMS_HIT/304 statuses with
> gen.cgi requests.

Very suspicious if ignoring client-sent Cache-Control: header fixes
things. What does the client sent Cache-Control header contains?

>
> However, I'm still fighting with caching index.cgi. It haven't
> modified its code yet, so it doesn't send any caching headers. I've
> managed to cache it via refresh_pattern like this:
>
> refresh_pattern -i index\.cgi 10 20% 60 refresh-ims
>
> Then it caches brilliantly, but I'm lacking on content freshness. The
> perfect solution would be to cache it for one minute time - no matter
> to anything else (because that's the frequency this site changes its
> contents).
>
> Could you give me some tips how to do that? Unfortunatelty setting
> 'min' to 1 and max to '1' in refresh_pattern doesn't work, as well as
> any other similar configuration... Squid starts to cache index.cgi
> only if it has value like '10' or higher in 'min' refresh_pattern
> field.

refresh_pattern can only extend a known freshness time. It works with
Date: header of last index.cgi response versus Last-Modified: multiplied
by the % parameter, if that amount of time has passed already a new
index.cgi request is made. Short time periods it can appear as if no
calculation is even being made. (when Date: moves forward it's too much
to increase the extension, and repeat...).
   Without headers to base the calculation on there is nothing to
extend. catch-22 as the Americans say.

Amos

-- 
Please be using
   Current Stable Squid 2.7.STABLE9 or 3.1.14
   Beta testers wanted for 3.2.0.10
Received on Thu Aug 25 2011 - 14:44:47 MDT

This archive was generated by hypermail 2.2.0 : Tue Aug 30 2011 - 12:00:02 MDT