Re: [squid-users] Question about refresh_pattern

From: Matus UHLAR - fantomas <uhlar@dont-contact.us>
Date: Tue, 6 May 2008 16:38:56 +0200

On 06.05.08 15:00, Piotr Ślatała wrote:
> Well, the problem is, when I use the same browser, I receive the same
> content. When I change the browser, squid communicates with http server to
> serve page. I'd like to avoid it.
> Moreover, when I go back to the first browser, and I refresh this page, I
> receive older content than in second browser. Why is it happen?

Are both browsers configured to use the same proxy?
What do HTTP headers of the content in both browsers say?
What do logs of squid say?

Note that browsers may have its own cache and can be configured not to
re-fetch the content in the same session.

Also, the content's HTTP headers may be broken, or configured to cache the
content for some time, which means browser won't re-fetch it even if it
changes (browser can't know if the content changed without trying to
re-fetch it, which may be disabled by HTTP headers)

> For the first time, it gets a content. With second try is it from cache.
> But , in the moment i change user-agent,

change browser or the user-agent header?

> i receive content from Apache,
> not from squid. I didn't find an answer for this problem in google :).

> Well, "never direct" it's not what i'm looking for(because every
> ~30minutes i want to refresh my content)

of course it is not. never_direct configures behaviour in cache hierarchy
and does not affect caching of the content.
(this is quite common false assumption)

> #css i js na 6h
> refresh_pattern -i \.css$ 360 90% 420 override-expire override-lastmod
> refresh_pattern -i .*\.js.* 360 90% 420 override-expire override-lastmod

First I advise you stop playing with refresh_pattern if you want to fix
your caching problems
> #obrazki 6h
> refresh_pattern -i \.gif$ 360 90% 420 override-expire override-lastmod
> ignore-reload
> refresh_pattern -i \.jpg$ 360 90% 420 override-expire override-lastmod
> ignore-reload
>
> #javascript, flash i style 24h-48h
> refresh_pattern -i \.js$ 1440 90% 2880 override-expire override-lastmod
> ignore-reload
> refresh_pattern -i \.swf$ 1440 90% 2880 override-expire override-lastmod
> ignore-reload
> refresh_pattern -i \.css$ 1440 90% 2880 override-expire override-lastmod
> ignore-reload
>
> #podstrony 30minut, xmle takze
> refresh_pattern -i \.html$ 30 90% 30 override-expire override-lastmod
> ignore-reload
> refresh_pattern -i \.xml$ 30 90% 30 override-expire override-lastmod
> ignore-reload
>
> #strona glowna: 20 minut
> refresh_pattern -i .*\/$ 20 90% 20 override-expire override-lastmod
> ignore-reload

-- 
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
We are but packets in the Internet of life (userfriendly.org)
Received on Tue May 06 2008 - 14:39:04 MDT

This archive was generated by hypermail 2.2.0 : Tue May 13 2008 - 12:00:02 MDT