[squid-users] Question about refresh_pattern

From: Piotr Ślatała <dokosza@dont-contact.us>
Date: Tue, 6 May 2008 15:00:12 +0200 (CEST)

Hello,
I've been through whole internet ;) looking for reason, why my squid
doesn't serve me cached content.

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?

For example:
links -memory-cache-size 0 -fake-user-agent "Links (2.1pre38; Linux
2.6.23-gentoo-r3 i6; d)" http://mypage/
For the first time, it gets a content. With second try is it from cache.
But , in the moment i change user-agent, 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)

My squid.conf:
http_port 192.168.100.68:3128 defaultsite=.... vhost

visible_hostname ......
acl all src 0.0.0.0/0.0.0.0
acl serwery dst 192.168.0.0/24
acl serwery dst 193.23.51.0/24
http_access allow serwery
http_access deny all

cache_peer 127.0.0.1 parent 80 0 no-query originserver

cache_mem 300 MB
maximum_object_size_in_memory 90 KB
cache_dir ufs /var/cache/squid 700 16 256

cache_replacement_policy heap LFUDA #i've been trying in both also with
lru memory_replacement_policy heap LFUDA

acl donotcache urlpath_regex .*\.pdf$
acl donotcache urlpath_regex \?
cache deny donotcache

#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

#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

#cache_log none
cache_store_log none

always_direct deny all

### nie chcemy icp
icp_port 0
icp_access deny all

#dla ie
ie_refresh on

#header_access User-Agent deny all # I've been trying also with changing
user agent
#header_replace User-Agent Nutscrape/1.0 (CP/M; 8-bit)

logformat combined %>a %ui %un [%{%d/%b/%Y:%H:%M:%S +0000}tl] "%rm %ru
HTTP/%rv" %Hs %<st "%{Referer}>h" "%{User-Agent}>h" %<A
cache_access_log /var/log/squid/access.log combined
#i've been also trying with disabling all logs.

-- 
ZMIEN TO JESTES NA DOKOSZA
Usługi fotograficzne i komputerowe
Piotr Ślatała
email: piotr@sepio.pl
tel.:  503 529 929
WWW:   http://sepio.pl
Received on Tue May 06 2008 - 13:00:21 MDT

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