Plugin Compatibility: Nginx Helper
The Nginx Helper plugin (30k active installs) "cleans nginx's fastcgi/proxy cache or redis-cache whenever a post is edited/published." We've had had least one request to have better integration between Comet Cache and Nginx Helper.
let me just add to that: The important part here is that when using the nginx or redis-cache for nginx and comet cache together is that the nginx cache doesn't get purged when comet updates it css/js-compression or anything else without a post beeing updated or a comment beeing made.
@Helmi Comet Cache only clears the cache when some event occurs that requires the cache to be cleared. I don't understand what you mean by "when comet updates it css/js-compression or anything else without a post beeing updated or a comment beeing made." Can you please elaborate?
@raamdev the problem isn't so much comet cache but the nginx helper plugin. comet cache decides an update is needed (reasons don't matter too much) and if the nginx helper doesn't decide an update is needed there's a problem. Comet cache then generates new file names for cache files and the nginx cache still holds the old markup with the old filenames of compressed css and js.
I see this regulary but of course mostly can't see what the reason is. The handling of "regeneration" is just different between nginx helper and comet cache and therefore it would be helpful if comet cache could force the nginx helper to purge after it renews its own cache files.
actually the nginx helper only is a helper plugin to purge the nginx cache whenever these events happen (like a new post is posted etc.) - maybe it'll be a better idea for comet cache to handle this in the plugin directly.
Here's the URL to the plugin https://de.wordpress.org/plugins/nginx-helper/
@Helmi Thanks for the extra info! I agree that it sounds like Comet Cache should probably handle automatically clearing the Nginx FastCGI/Proxy cache or Redis Cache on its own. A Comet Cache option for this would be a great idea.
Referencing a couple of slightly related issues: https://github.com/websharks/comet-cache/issues/47 https://github.com/websharks/comet-cache/issues/342
Just reviewing this issue and leaving some notes.
-
This will require Nginx Plus to test with, as the feature that Nginx Helper works with requires the commercial version of Nginx and not the free version. https://www.nginx.com/products/ ~ See also: http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html#fastcgi_cache_purge
Do I have that right or are any of you using this somehow with the free version?
-
Hotwiring this so that it works with the Nginx Helper plugin would involve this global and look something like the following.
global $rt_wp_nginx_helper; if ($rt_wp_nginx_helper->options['enable_purge']) { $rt_wp_nginx_helper->purgeUrl([LOCATION THAT COMET CACHE IS CLEARING]); } -
My feeling is that Nginx Helper is in a category all of its own, and using that plugin means that you're also using a very specific Nginx configuration that is not something that Comet Cache is able to auto-detect. Which means that in order for us to do an integration with Nginx Plus in this way, we'd either need to support everything that the Nginx Helper plugin does, and then document and support that additional layer of functionality. Or, we would need to assume that anyone using this Nginx Plus feature is already using the Nginx Helper plugin as well. In that case, simply interfacing with Nginx Helper would be easier and likely more effective.
-
Redis is something for a different discussion in my view.
Do I have that right or are any of you using this somehow with the free version?
I've never used Nginx Plus. This plugin is made for and delivered with EasyEngine which is a free and open source server management package. See https://easyengine.io/
EasyEngine is quite wide spread now and they're in the process of releasing their completely rewritten 4.0 this year. They already do support W3TC and WPSupercache. Maybe it's worth talking to these guys.
They already do support W3TC and WPSupercache.
Judging by the discussion here, it sounds like EasyEngine may be dropping support for WP Super Cache and W3TC soon.