Sorry, I posted another topic on a similar issue with W3TC on my live server, but I’ve been doing some more research and I now have a properly reproducible error that I believe is a bug unless I’m being especially stupid somehow!
So, the problem: Making a new post does not clear the cached front page.
I’m not getting confused with the browser cache - to test, I’m using an Incognito window in Chrome with Developer tools open & ‘Disable Cache’ ticked. I’m also using the latest version of EasyEngine (2.2.1).
Create a new Ubuntu 14.04.1 Server VM (I’m using VMware Fusion on OSX)
Add some test domains to /etc/hosts:
172.16.197.152 eetests.loc 172.16.197.152 eetest1.loc 172.16.197.152 eetest2.loc 172.16.197.152 eetest1.eetests.loc 172.16.197.152 eetest2.eetests.loc
sudo apt-get install ssh and connect to the VM using Terminal.
$ wget -qO ee rt.cx/ee && sudo bash ee $ sudo ee site create nipples.loc --wpsubdom --wpfc
Configure nginx-helper & w3tc as directed here. Page Cache and Browser Cache disabled, Database and Object caches set to memcached. “Enable Cache Purge” ticked in nginx-helper, with all but the last two purging options ticked (comments).
Create two test subdomains (Network admin > Sites > Add new): eetest1 & eetest2
Install “WordPress MU Domain Mapping” plugin and:
$ cd /var/www/nipples.loc/htdocs/wp-content/ $ sudo cp plugins/wordpress-mu-domain-mapping/sunrise.php . $ sudo nano /var/www/nipples.loc/wp-config.php
define( 'SUNRISE', 'on' ); a few lines from the top.
Configure in: Network Admin > Settings > Domain Mapping… CNAME: eetests.loc, Domain options 1, 2, 3 and 4 ticked.
Add the mapped domains eetest1.loc and eetest2.loc in Network Admin > Settings > Domains
$ sudo nano /etc/nginx/sites-enabled/eetests.loc
Uncomment both relevant lines for domain mapping and
$ sudo nginx -s reload
Now, visit http://eetest1.loc/ and everything looks ok. Try making a first post and everything’s still OK. Check the front page in a Chrome Incognito window with the browser cache disabled and it’s all fine.
Now try making one or two more posts, checking again in the Incognito window. The cached front page stops getting cleared.
What’s going on there then? I’ve tried just about everything I can think of and it’s driving me mad! Has anyone else got this setup working? Can you suggest anything?