Right now, when I perform "Empty All Caches" it doesn't send a PURGE request to varnish. The result is that varnish isn't being refreshed. Is there a way that I can make varnish purge it's cache when choosing "Empty All Caches"? Is there a way that I can hook into W3 Total Cache "Empty All Caches"?
Tell me more
×
WordPress Answers is a question and answer site for
WordPress developers and administrators. It's 100% free, no registration required.
|
A simple solution could be to check when you click the "empty all cache" Button with
The Varnish Configuration Language (VCL) also has the url purging function. It’s accessible via the purge_url(url_pattern) function.
The script above has the normal proxy/cache behaviour for request methods like GET & POST. But when a user connects via the "flush_all" method, the page is purged. |
||||
|
|
|
It appears that the problem is known to W3 Total Cache and that it may be fixed soon. Assuming that you have SSH access, open a new client and run:
This will force the cache to be refreshed (Please note that I do not use Varnish so this code is untested.) I found this on the garron Site. Cheers, |
|||
|
|