Hi, mahir.
Sorry for the late reply, summer holiday, u know
My problem is so weird, as it comes and goes and comes again while I have exactly no idea what caused it. The problem is very similar to the one here: Config nginx file for fastcgi cache & Woocommerce;
Let me describe my situation:
-
I created a wp site with easy engine. Main plugins are woocommerce, w3 total cache, nginx helper.
-
I usually use loader.io tool to stress the site and check the efficiency of cache plugin.
-
I found out that my site keep showing cached session, like a blank cart page or old products in cart, inspite of adding new ones. And this cached cart page is showing across platform and browsers. For instance, when I added a new product in PC-Chrome, it shows up even in PC-Firefox or Mobile-Chrome, etc. Clear cache from both nginx helper and w3 wonât help. Nothing changes.
-
I tried to turn off both nginx helper and w3 total, then added following line to my nginx.conf:
set $skip_cache 0;
# POST
requests and urls with a query string should always go to PHP
if
($request_method = POST) {
set
$skip_cache 1;
}
if
($query_string != "") {
set
$skip_cache 1;
}
if (
$cookie_woocommerce_items_in_cart = "1" ){
set $skip_cache 1;
}
# Don't
cache uris containing the following segments
if
($request_uri ~*
"/shop.*|/cart.*|/my-account.*|/checkout.*|/addons.*|/wp-admin/|/xmlrpc.php|wp-.*.php|index.php")
{
set
$skip_cache 1;
}
# Don't
use the cache for logged in users or recent commenters
if
($http_cookie ~*
"comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in")
{
set
$skip_cache 1;
}
But the problem still there, nothing happened.
-
After few days, I came back and found out that my site was back, working perfectly, so I made a backup to ensure I will can freely test it without worring.
-
I turned on all my cache plugins, still working fine, no problem. I thought I couldnât be happier. Then I use loader.io again to test and the problem showed up again. So I thought that I discovered how it appears.
-
I created a brand new VPS after that and restore the backup mentioned above, but surprisingly, the problem is still there (on a brand new vps, without load test).
-
I have just turned off everything again and waiting now to see if it would disappear.