This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some plugins flushing page cache all the time and without a reason effectively blocking | |
page caching functionality. | |
It's usually done by w3tc_flush_all / w3tc_flush_posts calls. | |
You may block those by cancelling their functionality by adding hooks to w3tc_preflush_posts / w3tc_preflush_all actions. | |
W3TC UI buttons send $extras as [ 'ui_action' = 'flush_button' ] value, this one | |
can be used to still allow flushing by UI button. | |
Here is the example code: | |