Squid3 TCP_MISS/200

Squid3 TCP_MISS/200

我在 Debian 上安装了 squid3-3.4.8。/var/log/squid3/access.log 中有些 gif 带有 HIT,但其中很多都为 MISS。以下是日志:

1465154641.561    243 10.10.70.71 TCP_MISS/200 356 GET http://ping.chartbeat.net/ping? - HIER_DIRECT/54.235.160.51 image/gif
1465154686.677    355 10.10.70.71 TCP_MISS/200 356 GET http://ping.chartbeat.net/ping? - HIER_DIRECT/75.101.135.237 image/gif
1465154690.942    196 10.10.70.71 TCP_MISS/200 356 GET http://ping.chartbeat.net/ping? - HIER_DIRECT/75.101.135.237 image/gif
1465154761.749    430 10.10.70.71 TCP_MISS/200 356 GET http://ping.chartbeat.net/ping? - HIER_DIRECT/54.243.156.79 image/gif
1465154826.042    416 10.10.70.71 TCP_MISS/200 356 GET http://ping.chartbeat.net/ping? - HIER_DIRECT/54.83.16.157 image/gif
1465154896.843    362 10.10.70.71 TCP_MISS/200 356 GET http://ping.chartbeat.net/ping? - HIER_DIRECT/23.21.149.132 image/gif
1465155059.310    183 10.10.70.71 TCP_MISS/200 488 GET http://track.adform.net/serving/unload/? - HIER_DIRECT/37.157.6.252 image/gif
1465155081.000    361 10.10.70.71 TCP_MISS/200 356 GET http://ping.chartbeat.net/ping? - HIER_DIRECT/54.225.223.150 image/gif
1465155133.835    128 10.10.70.71 TCP_MISS/200 488 GET http://track.adform.net/serving/unload/? - HIER_DIRECT/37.157.6.252 image/gif
1465155151.674    349 10.10.70.71 TCP_MISS/200 356 GET http://ping.chartbeat.net/ping? - HIER_DIRECT/23.21.95.141 image/gif

以下是/var/log/squid3/cache.log

HTTP/1.1 200 OK
Server: nginx
Date: Sun, 05 Jun 2016 19:32:13 GMT
Content-Type: image/gif
Cache-Control: no-cache, no-store, must-revalidate
Pragma: no-cache
Expires: -1
Access-Control-Allow-Origin: *
P3P: CP="NOI DSP COR NID CURa ADMa DEVa TAIa PSAa PSDa OUR LEG NAV INT"
X-Cache: MISS from localhost
X-Cache-Lookup: MISS from localhost:3128
Transfer-Encoding: chunked
Via: 1.1 localhost (squid/3.4.8)
Connection: keep-alive


----------
2016/06/05 22:32:13.835 kid1| http.cc(1062) persistentConnStatus: local=10.10.84.115:48806 remote=37.157.6.252:80 FD 16 flags=1 eof=0
2016/06/05 22:32:13.835 kid1| http.cc(1062) persistentConnStatus: local=10.10.84.115:48806 remote=37.157.6.252:80 FD 16 flags=1 eof=0
2016/06/05 22:32:31.325 kid1| client_side.cc(2407) parseHttpRequest: HTTP Client local=10.10.84.115:3128 remote=10.10.70.71:57168 FD 13 flags=1
2016/06/05 22:32:31.325 kid1| client_side.cc(2408) parseHttpRequest: HTTP Client REQUEST:
---------
GET http://ping.chartbeat.net/ping?h=15min.lt&p=%2F&u=DqS6y2zqfeBcFYFs&d=15min.lt&g=54232&g0=default&n=0&f=00001&c=9&x=0&m=0&y=31461&o=1249&w=916&j=270&R=0&W=0&I=1&E=0&e=0&r=&b=19769&t=BsrbM3BDP0jmCOnR3pCdgvMIDaWsQK&V=78&tz=-180&sn=6&EE=0&_ HTTP/1.1
Host: ping.chartbeat.net
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0
Accept: image/png,image/*;q=0.8,*/*;q=0.5
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://www.15min.lt/
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache


----------
2016/06/05 22:32:31.481 kid1| http.cc(2260) httpStart: httpStart: "GET http://ping.chartbeat.net/ping?h=15min.lt&p=%2F&u=DqS6y2zqfeBcFYFs&d=15min.lt&g=54232&g0=default&n=0&f=00001&c=9&x=0&m=0&y=31461&o=1249&w=916&j=270&R=0&W=0&I=1&E=0&e=0&r=&b=19769&t=BsrbM3BDP0jmCOnR3pCdgvMIDaWsQK&V=78&tz=-180&sn=6&EE=0&_"
2016/06/05 22:32:31.481 kid1| http.cc(2216) sendRequest: HTTP Server local=10.10.84.115:53318 remote=23.21.95.141:80 FD 15 flags=1
2016/06/05 22:32:31.481 kid1| http.cc(2217) sendRequest: HTTP Server REQUEST:
---------
GET /ping?h=15min.lt&p=%2F&u=DqS6y2zqfeBcFYFs&d=15min.lt&g=54232&g0=default&n=0&f=00001&c=9&x=0&m=0&y=31461&o=1249&w=916&j=270&R=0&W=0&I=1&E=0&e=0&r=&b=19769&t=BsrbM3BDP0jmCOnR3pCdgvMIDaWsQK&V=78&tz=-180&sn=6&EE=0&_ HTTP/1.1
Host: ping.chartbeat.net
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0
Accept: image/png,image/*;q=0.8,*/*;q=0.5
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://www.15min.lt/
Pragma: no-cache
Via: 1.1 localhost (squid/3.4.8)
X-Forwarded-For: 10.10.70.71
Cache-Control: no-cache
Connection: keep-alive


----------
2016/06/05 22:32:31.595 kid1| ctx: enter level  0: 'http://ping.chartbeat.net/ping?h=15min.lt&p=%2F&u=DqS6y2zqfeBcFYFs&d=15min.lt&g=54232&g0=default&n=0&f=00001&c=9&x=0&m=0&y=31461&o=1249&w=916&j=270&R=0&W=0&I=1&E=0&e=0&r=&b=19769&t=BsrbM3BDP0jmCOnR3pCdgvMIDaWsQK&V=78&tz=-180&sn=6&EE=0&_'
2016/06/05 22:32:31.595 kid1| http.cc(705) processReplyHeader: processReplyHeader: key '9A7E3C59EFE4B10B4AE720A6F2E141DA'
2016/06/05 22:32:31.595 kid1| http.cc(746) processReplyHeader: HTTP Server local=10.10.84.115:53318 remote=23.21.95.141:80 FD 15 flags=1
2016/06/05 22:32:31.595 kid1| http.cc(747) processReplyHeader: HTTP Server REPLY:
---------
HTTP/1.1 200 OK
Cache-Control: no-cache, no-store, must-revalidate
Content-Type: image/gif
Expires: 0
Pragma: no-cache
Content-Length: 43
Connection: keep-alive

GIF89a
----------
2016/06/05 22:32:31.595 kid1| ctx: exit level  0
2016/06/05 22:32:31.595 kid1| ctx: enter level  0: 'http://ping.chartbeat.net/ping?h=15min.lt&p=%2F&u=DqS6y2zqfeBcFYFs&d=15min.lt&g=54232&g0=default&n=0&f=00001&c=9&x=0&m=0&y=31461&o=1249&w=916&j=270&R=0&W=0&I=1&E=0&e=0&r=&b=19769&t=BsrbM3BDP0jmCOnR3pCdgvMIDaWsQK&V=78&tz=-180&sn=6&EE=0&_'
2016/06/05 22:32:31.595 kid1| http.cc(916) haveParsedReplyHeaders: HTTP CODE: 200
2016/06/05 22:32:31.595 kid1| ctx: exit level  0
2016/06/05 22:32:31.595 kid1| WARNING: Could not determine this machines public hostname. Please configure one or set 'visible_hostname'.
2016/06/05 22:32:31.595 kid1| WARNING: Could not determine this machines public hostname. Please configure one or set 'visible_hostname'.
2016/06/05 22:32:31.674 kid1| client_side.cc(1459) sendStartOfMessage: HTTP Client local=10.10.84.115:3128 remote=10.10.70.71:57168 FD 13 flags=1
2016/06/05 22:32:31.674 kid1| client_side.cc(1460) sendStartOfMessage: HTTP Client REPLY:
---------
HTTP/1.1 200 OK
Date: Sun, 05 Jun 2016 19:32:31 GMT
Cache-Control: no-cache, no-store, must-revalidate
Content-Type: image/gif
Expires: 0
Pragma: no-cache
Content-Length: 43
X-Cache: MISS from localhost
X-Cache-Lookup: MISS from localhost:3128
Via: 1.1 localhost (squid/3.4.8)
Connection: keep-alive

任何帮助都值得感激。已编辑:Pragma:no-cache 指示我的 squid 不缓存。有办法解决这个问题吗?因为有了这个逻辑,服务器可以说不缓存所有内容。

答案1

因为有了这个逻辑,服务器就可以说不缓存所有内容。

是的,这就是重点。源和用户代理对资源的可缓存性以及从缓存中处理请求的可取性了解很多,因此它们会得到一组旋钮来控制缓存。您不想在缓存中覆盖它,因为它会破坏其他人所依赖的各种重要假设。

相关内容