- 论坛徽章:
- 0
|
我使用的是varnish 做的缓存代理,发现一个问题,.PHP程序是不做缓存的,我访问测式www.xxx.com/index.php默认首页,没有被缓存正常,但是我访问www.xxx.com默认首页被缓存了,真是搞不明白
这是不加index.php访问的,命中被缓存了- Request URL:http://olympics.nimads.com/
- Request Method:GET
- Status Code:200 OK
- Request Headersview source
- Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
- Accept-Charset:GBK,utf-8;q=0.7,*;q=0.3
- Accept-Encoding:gzip,deflate,sdch
- Accept-Language:zh-CN,zh;q=0.8
- Cache-Control:max-age=0
- Connection:keep-alive
- Host:olympics.nimads.com
- User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.10 (KHTML, like Gecko) Chrome/20.0.1123.4 Safari/536.10
- Response Headersview source
- Accept-Ranges:bytes
- Age:8
- Connection:keep-alive
- Content-Encoding:gzip
- Content-Length:33
- Content-Type:text/html; charset=utf-8
- Date:Mon, 23 Jul 2012 08:49:43 GMT
- Server:nginx/1.2.0
- Vary:Accept-Encoding
- Via:1.1 varnish
- X-Cache:HIT You!
- X-Powered-By:PHP/5.3.6
- X-Varnish:140248434 140248138
- x-hits:1
复制代码 这是index.php访问的,不被缓存了- Request URL:http://olympics.nimads.com/index.php
- Request Method:GET
- Status Code:200 OK
- Request Headersview source
- Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
- Accept-Charset:GBK,utf-8;q=0.7,*;q=0.3
- Accept-Encoding:gzip,deflate,sdch
- Accept-Language:zh-CN,zh;q=0.8
- Connection:keep-alive
- Host:olympics.nimads.com
- User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.10 (KHTML, like Gecko) Chrome/20.0.1123.4 Safari/536.10
- Response Headersview source
- Accept-Ranges:bytes
- Age:0
- Connection:keep-alive
- Content-Encoding:gzip
- Content-Length:33
- Content-Type:text/html; charset=utf-8
- Date:Mon, 23 Jul 2012 08:52:09 GMT
- Server:nginx/1.2.0
- Vary:Accept-Encoding
- Via:1.1 varnish
- X-Cache:MISS Me!
- X-Powered-By:PHP/5.3.6
- X-Varnish:140254638
- x-hits:0
复制代码 |
|