WordPress action hook
siteground_optimizer_flush_cache
Fired by 14 WordPress plugins, running on 1M+ sites between them.
How to use siteground_optimizer_flush_cache
It's an action: your callback runs at that point and receives 1 argument. Nothing needs to be returned.
Add this to your theme's functions.php or a small custom plugin:
add_action( 'siteground_optimizer_flush_cache', function( $url ) {
// Your code runs here.
}, 10, 1 );Argument names come from Speed Optimizer's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
14 plugins that fire siteground_optimizer_flush_cache
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
Speed Optimizer1+ million installs
do_action( 'siteground_optimizer_flush_cache', $url )core/Supercacher/Supercacher.php:283 -
Atarim1,000+ installs
do_action( 'siteground_optimizer_flush_cache' )doit/abilities/class-avcf-abilities-cache.php:415 -
WebChange Detector: Visual Regression Testing & Visual Checks After Updates300+ installs
do_action( 'siteground_optimizer_flush_cache' )admin/class-webchangedetector-cache-clearer.php:222 -
Wallet Up200+ installs
do_action( 'siteground_optimizer_flush_cache' )src/Plugin.php:2169 -
EZY.ai100+ installs
do_action( 'siteground_optimizer_flush_cache' )includes/class-ezy-ai-cache-purger.php:110 -
Instaread Audio Player100+ installs
do_action( 'siteground_optimizer_flush_cache' )includes/optimizer-compat.php:522 -
KAF AI80+ installs
do_action( 'siteground_optimizer_flush_cache' )includes/cache.php:223 -
Limbus Maintenance Page & Shop Pause30+ installs
do_action( 'siteground_optimizer_flush_cache' )includes/class-cache.php:110 -
Ranki Publisher20+ installs
do_action( 'siteground_optimizer_flush_cache' )ranki-publisher.php:1465 -
WPHEKA Request For Quote for WooCommerce10+ installs
do_action( 'siteground_optimizer_flush_cache' )includes/class-wpheka-rfq-cache.php:237 -
DBest ChatBot10+ installs
do_action( 'siteground_optimizer_flush_cache' )classes/health.php:399 -
AltShieldFewer than 10 installs
do_action( 'siteground_optimizer_flush_cache' )includes/class-applier.php:515 -
StyleRaiseFewer than 10 installs
do_action( 'siteground_optimizer_flush_cache', $url )includes/cache/class-purger.php:198 -
FizzyTech HST CalculatorFewer than 10 installs
do_action( 'siteground_optimizer_flush_cache' )includes/class-fizzhstc-cache.php:128
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.