Magento Turpentine Varnish无法正常工作

时间:2014-01-31 06:56:29

标签: php magento caching varnish varnish-vcl

以下是我网站的标题,它是一个安装了Turpentine的Magento网站,它显示了Varnish Hit,但Age Headers没有显示,它在{上显示“ Sortof ” {3}}。请帮忙!

请求标题

Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/;q=0.8
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Cache-Control:no-cache
Connection:keep-alive
Host:www.xyz.com
Pragma:no-cache
Referer:http://www.xyz.com/
User-Agent:Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.71 Safari/537.36

响应标题

Connection:keep-alive
Content-Encoding:gzip
Content-Type:text/html; charset=UTF-8
Date:Fri, 31 Jan 2014 06:46:22 GMT
Server:Apache/2.2.15 (Red Hat)
Transfer-Encoding:chunked
Via:1.1 varnish
X-Powered-By:PHP/5.3.3
X-Turpentine-Cache:1
X-Turpentine-Esi:1
X-Varnish:751218804 751214783
X-Varnish-Currency:
X-Varnish-Esi-Access:
X-Varnish-Esi-Method:
X-Varnish-Hits:5
X-Varnish-Set-Cookie:frontend=6417b8aee0944094808f0b75335c84f3; expires=Fri, 31-Jan-2014 07:39:55 GMT; path=/; domain=www.alldaychemist.com; httponly
X-Varnish-Store:

1 个答案:

答案 0 :(得分:1)

Magneto Turpentine插件有意删除Age响应标头。您可以在此处查看其Varnish配置模板:

https://github.com/nexcess/magento-turpentine/blob/master/app/code/community/Nexcessnet/Turpentine/misc/version-3.vcl#L279

以下是相关摘录:

        # we'll set our own cache headers if we need them
        unset beresp.http.Cache-Control;
        unset beresp.http.Expires;
        unset beresp.http.Pragma;
        unset beresp.http.Cache;
        unset beresp.http.Age;

简而言之,它按预期工作,没有什么可担心的。