Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
<?php
/**
* Callback function for boost cache cleaner.
*/
function boost_cache_cleaner_callback() {
// Check if user has access to this function.
if (!user_is_anonymous()) {
if (module_exists('domain')) {
global $base_root;
foreach (domain_domains() as $domain) {
if (isset($domain['path'])) {
$base_root = $domain['path'];
boost_flush_caches();
}
}
} else {
boost_flush_caches();
}
}
}
?>