Setting up nginx full page cache has made a big difference even with a solid base architecture (HAProxy load balancer for multiple app servers with Nginx + PHP-FPM. I’m encountering a few issues that may / not be related in trying to get the nginx-helper plugin operational to make the content author experience with caching better.
The Purge Entire Cache button works to invalidate all the caches. Yaaah!
The GET request doesn’t work b/c the curl requests cannot complete b/c of environment restrictions on access from the application servers. That’s on environment tho, not the plugin in any way.
The location of cache is not /var/run/nginx-cache so I set the local cache option with RT_WP_NGINX_HELPER_CACHE_PATH in equivalent of wp-config (site architecture loosely based on Roots.io/Trellis so config/application.php). Publish or update posts do show attempts in the log to invalidate, but are not successful at locating cached copies.
For most of our defined constants, I’m using the fastcgi_param in nginx config. This ensures that the source code in repo does not need to know anything about it’s deployment context - and if a deployment is scaled out on different server / user, there is one config which the automated deploy can provide. What is most strange is that RT_WP_NGINX_HELPER_CACHE_PATH will not be read from that method despite showing up in a var_dump of $_SERVER. Other values like WP_HOME and credentials are received fine through it.
Anyone experienced similar issues or could suggest helpful items to remedy. The purge all “nuclear” option is a reasonable fallback but would obviously like to have the more nuanced option.