Re: [squid-users] Do not cache 302 !!

From: Chris Robertson <crobertson_at_gci.net>
Date: Thu, 28 Jan 2010 10:49:42 -0900

Amos Jeffries wrote:
> Youenn Boussard wrote:
>> Hello the list,
>>
>> I put this directive in my squid.conf :
>>
>> acl redirect rep_header Location .
>> no_cache deny redirect
>>
>> So I expect that all response with Location header will be not cache.
>>
>> Or when the first url is
>> HTTP/1.1 302 Moved Temporarily
>> Date: Thu, 28 Jan 2010 10:42:26 GMT
>> ...
>> Expires: Fri, 29 Jan 2010 10:42:22 GMT
>> Location: ...
>> Cache-Control: max-age=3D86400, s-maxage=3D86400, public,
>> proxy-revalidate
>> Content-Type: text/html;charset=3Dutf-8
>> ...
>> X-Cache: MISS from ...
>> X-Cache-Lookup: MISS from ...:3128
>> Via: 1.0 ...:3128 (squid/2.6.STABLE23)
>>
>> And the second :
>> HTTP/1.1 302 Moved Temporarily
>> Date: Thu, 28 Jan 2010 10:42:26 GMT
>> ...
>> Expires: Fri, 29 Jan 2010 10:42:22 GMT
>> Location: ...
>> Cache-Control: max-age=3D86400, s-maxage=3D86400, public,
>> proxy-revalidate
>> Content-Type: text/html;charset=3Dutf-8
>> Age: 30
>> X-Cache: HIT from frdplirzof1
>> X-Cache-Lookup: HIT from frdplirzof1:3128
>> Via: 1.0 ... (squid/2.6.STABLE23)
>>
>> So the rule doesn't work. I don't why ?
>
> Does .* instead of . in the rule work better?

Probably not. There appears to be a space between "Location" and the
period.

> (Not sure myself, your version is supposed to match)

Wouldn't "acl redirect http_status 302" work as an alternative (without
the need to run the regex engine).

>
> Also "no_cache" was replaced by "cache" a very long time ago.
> Syntax is identical, Just strip the "no_".
>
>> Have you a method to avoid caching redirection in squid ? (I can't
>> change
>> the cache-control header)
>> Thanks a lot for answer , regards Youenn
>>
>
> Amos

Chris
Received on Thu Jan 28 2010 - 19:50:06 MST

This archive was generated by hypermail 2.2.0 : Fri Jan 29 2010 - 12:00:05 MST