內容簡介
Automatic Cache Flusher for W3 Total Cache 是一款簡單的外掛,旨在自動清除 W3 Total Cache 的快取,以防止在更新外掛、佈景主題或核心時發生快取衝突,節省使用者的操作時間。
【主要功能】
• 自動清除快取,避免手動操作
• 支援更新後的快取管理
• 無需編寫程式碼即可使用
外掛標籤
開發者團隊
② 後台搜尋「Automatic Cache Flusher for W3 Total Cache」→ 直接安裝(推薦)
原文外掛簡介
W3 Total Cache recommends clearing your cache after a (plugin) update to prevent cache conflicts, but it does not do this for you. It shows a banner with a ‘clear cache’ button, and you have to click it yourself. That does not help when your updates run automatically, or from a tool like ManageWP, MainWP or Installatron.
This plugin purges the W3 Total Cache page cache for you. No settings, no buttons.
When does it purge?
After a plugin, theme or WordPress update (and after installing a plugin or theme over an existing one).
After a translation update.
When a plugin is activated or deactivated.
When you switch themes.
Whenever Elementor throws away its generated CSS files (see below).
However many of these happen at once, the cache is purged only once per page load.
Why this matters for Elementor sites
Elementor stores the styling of your pages in separate CSS files (in wp-content/uploads/elementor/css/). Since Elementor 3.33 it deletes all of those files whenever a plugin is activated, deactivated or updated, when you switch themes, and when you use Elementor → Tools → Clear Files & Data (and after some of its own updates and settings changes). Elementor builds the files again the next time a page is generated.
W3 Total Cache, however, keeps serving the saved copies of your pages. Those copies still point at the CSS files that were just deleted, so visitors get pages without styling until someone clears the cache by hand.
This plugin notices when Elementor deletes its CSS files and purges the page cache right after. Then it visits your home page once in the background, so Elementor rebuilds its CSS and W3 Total Cache stores a fresh copy. Two minutes later it purges once more, to catch a page that a visitor happened to get cached in the meantime.
You do not need Elementor to use this plugin. Without Elementor it simply purges after updates, (de)activations and theme switches.
Only the page cache
By default the plugin purges only the page cache (W3 Total Cache’s “Purge All Caches” is not used). That is all that is needed to fix outdated pages. “Purge All Caches” also empties the object, database and minify caches, and it makes Elementor delete its CSS files once more. If you want it anyway, see the FAQ.
For developers
acfw3tc_flush_scope (filter): 'page' (default) or 'all' (W3 Total Cache’s “Purge All Caches”).
acfw3tc_enable_warmup (filter): return false to skip the background visit to your home page.
acfw3tc_triggers (filter): the list of triggers that lead to a purge. Default: upgrade, translation, core_updated, plugin_activated, plugin_deactivated, theme_switched, elementor_css_cleared.
acfw3tc_purged (action): fires after the plugin asked W3 Total Cache to purge, with the reasons, scope, W3 Total Cache function and phase (immediate or followup).
Example, to also empty all other W3 Total Cache caches:
add_filter( 'acfw3tc_flush_scope', function () { return 'all'; } );
Privacy notices
This plugin does not:
track users;
write any user personal data to the database;
send any data to external servers (the background visit goes to your own home page);
use cookies.
Support
Issues with ‘Automatic Cache Flusher for W3 Total Cache’ fall within the scope of the support, issues with W3 Total Cache do not. Please use the appropriate forums, issues on Github, or send an email.
