【发布时间】:2015-01-10 13:40:33
【问题描述】:
在 Ubuntu 12.04lts 上运行的 (nginx)、magento(1.9.0.1)、turpentine 和 varnish(3.0.2) 存在一些奇怪的问题。 我们对清漆/松节油没有 2 经验,所以这可能是基本的事情。
我们成功地将松节油 vcl 应用于正在运行的 varnish 实例,并使用 varnishadm vcl.list 检查结果。我们还在松节油中启用了调试信息。
奇怪的事情:
如果我们在magento backend->cache中激活两个turpentine缓存方法,尤其是fpc,我们得到以下响应
Server nginx
Transfer-Encoding chunked
Via 1.1 varnish
X-Frame-Options SAMEORIGIN
X-Powered-By PHP/5.3.10-1ubuntu3.15
X-Turpentine-Cache 0
X-Turpentine-Esi 1
X-Varnish 293774805
X-Varnish-Hits 0
以及 3.5 秒的真正糟糕的响应时间 导致页面似乎永远不会被缓存,正如您在 X-Turpentine-Cache 和 X-Varnish-Hits 中清楚看到的那样。标题中也没有设置年龄。
但是如果我们停用松节油 fpc,同时让 vcl 保持不变,我们会得到 p>
Age 29
Server nginx
Via 1.1 varnish
X-Frame-Options SAMEORIGIN
X-Powered-By PHP/5.3.10-1ubuntu3.15
X-Varnish 293775151 293775096
X-Varnish-Hits 2
结合优化后的大约 100 毫秒的响应时间,这似乎很成功。
我们在正确设置松节油/清漆方面缺少什么,是什么导致激活松节油缓存的命中率为零?
提前谢谢...
【问题讨论】:
-
你是否启用了Mageto中的所有缓存?
-
是的,都是内部的。我禁用了 memcached 等。
-
当然没有其他外部 fullpagecache 正在运行...
-
两个标题中的 "Server nginx" 让我觉得您的配置有问题。我没有看到完整的图片,所以这个问题只是猜测。