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:

functions.php
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.

  1. Speed Optimizer icon Speed Optimizer1+ million installs do_action( 'siteground_optimizer_flush_cache', $url ) core/Supercacher/Supercacher.php:283
  2. Atarim icon Atarim1,000+ installs do_action( 'siteground_optimizer_flush_cache' ) doit/abilities/class-avcf-abilities-cache.php:415
  3. WebChange Detector: Visual Regression Testing & Visual Checks After Updates icon WebChange Detector: Visual Regression Testing & Visual Checks After Updates300+ installs do_action( 'siteground_optimizer_flush_cache' ) admin/class-webchangedetector-cache-clearer.php:222
  4. Wallet Up icon Wallet Up200+ installs do_action( 'siteground_optimizer_flush_cache' ) src/Plugin.php:2169
  5. EZY.ai icon EZY.ai100+ installs do_action( 'siteground_optimizer_flush_cache' ) includes/class-ezy-ai-cache-purger.php:110
  6. Instaread Audio Player icon Instaread Audio Player100+ installs do_action( 'siteground_optimizer_flush_cache' ) includes/optimizer-compat.php:522
  7. KAF AI icon KAF AI80+ installs do_action( 'siteground_optimizer_flush_cache' ) includes/cache.php:223
  8. Limbus Maintenance Page & Shop Pause icon Limbus Maintenance Page & Shop Pause30+ installs do_action( 'siteground_optimizer_flush_cache' ) includes/class-cache.php:110
  9. Ranki Publisher icon Ranki Publisher20+ installs do_action( 'siteground_optimizer_flush_cache' ) ranki-publisher.php:1465
  10. WPHEKA Request For Quote for WooCommerce icon WPHEKA Request For Quote for WooCommerce10+ installs do_action( 'siteground_optimizer_flush_cache' ) includes/class-wpheka-rfq-cache.php:237
  11. DBest ChatBot icon DBest ChatBot10+ installs do_action( 'siteground_optimizer_flush_cache' ) classes/health.php:399
  12. AltShield icon AltShieldFewer than 10 installs do_action( 'siteground_optimizer_flush_cache' ) includes/class-applier.php:515
  13. StyleRaise icon StyleRaiseFewer than 10 installs do_action( 'siteground_optimizer_flush_cache', $url ) includes/cache/class-purger.php:198
  14. FizzyTech HST Calculator icon 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.