用NGINX文件清理caching,不更新WordPress

看来,清漆丢失或没有正确validationcaching。 当我尝试清除我的caching,我得到200 OKcaching成功清除,但我的网页不更新。 我只是简单地对我的footer.php进行HTML修改(使用WordPress),但是他们没有出现。 我检查了我的标题,他们如下所示:

HTTP/1.1 200 OK Server: nginx/1.6.0 Content-Type: text/html Last-Modified: Wed, 23 Apr 2014 18:47:17 GMT ETag: "53580ab5-2" Content-Length: 2 Accept-Ranges: bytes Date: Fri, 10 Oct 2014 15:53:28 GMT X-Varnish: 21166333 Age: 0 Via: 1.1 varnish Connection: keep-alive 

X-Varnish标题中缺less“填充caching的请求的ID”。

所以我检查了标题,直接从我的VPS托pipe我的网站运行命令,它似乎工作正常:

 HTTP/1.1 200 OK Server: nginx/1.6.0 Content-Type: text/html; charset=UTF-8 Vary: Accept-Encoding X-Powered-By: PHP/5.4.33 X-Pingback: http://example.com/xmlrpc.php Date: Fri, 10 Oct 2014 15:52:56 GMT X-Varnish: 21166331 21166330 Age: 21 Via: 1.1 varnish Connection: keep-alive 

这是我的VCL文件:

 backend default { .host = "127.0.0.1"; .port = "8080"; } acl purge { "localhost"; "127.0.0.1"; "173.10.93.222"; } sub vcl_recv { if (req.request == "BAN") { error 200 "Cached Cleared Successfully."; } if (req.request == "PURGE") { if (!client.ip ~ purge) { error 405 "Not allowed."; } return(lookup); } if (req.url ~ "^/$") { unset req.http.cookie; } } sub vcl_hit { if (req.request == "PURGE") { set obj.ttl = 0s; error 200 "Purged."; } } sub vcl_miss { if (req.request == "PURGE") { error 404 "Not in cache."; } if (!(req.url ~ "wp-(login|admin)")) { unset req.http.cookie; } if (req.url ~ "^/[^?]+.(jpeg|jpg|png|gif|ico|js|css|txt|gz|zip|lzma|bz2|tgz|tbz|html|htm)(\?.|)$") { unset req.http.cookie; set req.url = regsub(req.url, "\?.$", ""); } if (req.url ~ "^/$") { unset req.http.cookie; } } sub vcl_fetch { if (req.url ~ "^/$") { unset beresp.http.set-cookie; } if (!(req.url ~ "wp-(login|admin)")) { unset beresp.http.set-cookie; } } 

当我查看网站www.isvarnishworking.com时,我得到以下信息:

是! 有点! 清漆看起来是在这个url回应,但“年龄”标题是小于1。

一些援助将不胜感激,我有一种感觉,这是简单的东西。 我应该注意到这是在NGINX服务器上运行的。

我的style.css似乎更新很好,只是页面的DOM不更新。

没关系,似乎Varnish在初始页面加载之后工作,但我更新的文件没有显示的原因是因为APC。