千千阙歌 wrote:
> squid-users,您好!
> 
> Redhat Linux AS 4: squid2.6.STABLE16 + apache 2.0.61
> 
> 1.I use apache to control cache time ,
>   <IfModule mod_expires.c>
>     ExpiresActive on
>     ExpiresByType text/html A60
>     ExpiresByType text/css A1296000
>     ExpiresByType image/gif A1296000
>     ExpiresByType image/jpeg A1296000
>     EXpiresByType application/x-shockwave-flash A1296000
>     EXpiresByType application/x-javascript      A1296000
>     ExpiresDefault      A60
>   </IfModule>
>   
>   then i found the squid can't cache , and the i change A60 to A61 , the 
> squid work well!
>   
> 2.If i use squid control the cache time,it also dosn't work!
>   refresh_pattern -i ^http://media.mydomain.com/ 1 100% 1 override-lastmod 
> override-expire reload-into-ims      (1 minute can't cache)
>   
> refresh_pattern -i ^http://media.hexun.com/ 2 100% 2 override-lastmod 
> override-expire reload-into-ims      (when i set 2 minute , it works! )
> 
>   i really don't known why!

Hmm, I think Apache might be sending out Cache-Control: max-age=60 ??
That is not stripped by your override-* and will prevent squid saving
objects past 60 seconds.

NP: by default refresh_patterns only applies when there are no Expires:
or Cache-Control, Last-Modified: headers.
The override-* options effectively strip out some of those headers
(permanently) before their presence is checked to see if refresh_pattern
is needed.
BUT, if some header details remain after stripping, the pattern may
still be prevented from determining the expiry time.

I hope this helps you understand refresh_pattern a little more.

Amos

Reply via email to