求助:squid中refresh_pattern的配置问题
自己在虚拟机上搭建了redhat+squid环境,想对页面和图片做一些缓存,
因为原网站使用了url重写,此时访问html的http头是这样的:
(Status-Line) HTTP/1.1 200 OK
Cache-Control private
Content-Length 103073
Content-Type text/html; charset=utf-8
Date Tue, 30 Dec 2008 08:41:23 GMT
Server Microsoft-IIS/6.0
Set-Cookie onlineusercount=151; expires=Tue, 30-Dec-2008 08:44:23 GMT; path=/
Set-Cookie dnt=referer=showtopic.aspx%3ftopicid%3d199411%26page%3d1&oldtopic=D199411; domain=.xxx.com.cn; path=/
Set-Cookie dnt=referer=showtopic.aspx%3ftopicid%3d199411%26page%3d1&oldtopic=D199411; domain=.xxx.com.cn; path=/
X-AspNet-Version 2.0.50727
X-Powered-By ASP.NET.
也就是说将原来aspx页面映射成了html,但是这样的页面默认是不缓存的。
因此在squid里面进行了设置(每一行都单独设置过)
refresh_pattern –i \.html$ 0 20% 4320 ignore-private
refresh_pattern –i \.html$ 0 20% 4320 ignore-private ignore-reload
refresh_pattern –i http://bj.xxx.com.cn 0 20% 4320
refresh_pattern –i http://play.xxx.com.cn/defautl.html 0 20% 4320
refresh_pattern –i http://photo.xxx.com.cn/default.html 0 20% 4320
refresh_pattern –i http://play\.xxx\.com\.cn/default\.html 0 20% 4320
也将顺序从中间调到第一,原来是
refresh_pattern –i . 0 20% 4320
refresh_pattern –i \.html$ 0 20% 4320 ignore-private
后面变成了
refresh_pattern –i \.html$ 0 20% 4320 ignore-private
refresh_pattern –i . 0 20% 4320
但是squid好像对html仍然没有缓存,以下是接收到的头
(Status-Line) HTTP/1.0 200 OK
Cache-Control private
Connection keep-alive
Content-Length 46101
Content-Type text/html; charset=utf-8
Date Wed, 31 Dec 2008 08:23:41 GMT
Server Microsoft-IIS/6.0
Set-Cookie onlineusercount=18; expires=Wed, 31-Dec-2008 08:26:41 GMT; path=/
Set-Cookie lastolupdate=1000919187; path=/
Via 1.0 cache.xxx.com.cn (squid/3.0.STABLE1)
X-AspNet-Version 2.0.50727
X-Cache MISS from cache.xxx.com.cn
X-Powered-By ASP.NET
x-Cache仍然是MISS.
想请教大家一下,到底是哪出错了?