我在博客上写了一篇文章,直接回答了这个问题。我的帖子详细介绍了如何安装代码、如何使用代码以及代码的作用。
如果您阅读了我的博客文章,您将能够轻松、自动地从WordPress插件W3 Total Cache中清除WordPress操作挂钩:save\\u post上的缓存。
Automatically clear all caches with W3 Total Cache
在WordPress操作挂钩save\\u post上,您有以下要清除的缓存选项:
$this->clear_db_caches();
Calls the W3TC function: w3tc_dbcache_flush();
Clears the DB caches completely. Note: Doesn’t clear MySQL Query Cache, just WP based DB caches.
$this->clear_minify_caches();
Calls the W3TC function: w3tc_minify_flush();
Clears the minified content caches completely.
$this->clear_object_caches();
Calls the W3TC function: w3tc_objectcache_flush();
Clears the object caches completely.
$this->clear_page_caches();
Calls the W3TC function: w3tc_pgcache_flush();
Clears the Page Cache completely.
$this->clear_all_caches();
Calls each of the W3TC functions in one instance.
Attempts to clear all W3TC caches completely.