You are here

function boost_cache_cleaner_callback in Boost Cache Cleaner 7.3

Same name and namespace in other branches
  1. 7 boost_cache_cleaner.module \boost_cache_cleaner_callback()
  2. 7.2 boost_cache_cleaner.module \boost_cache_cleaner_callback()

Callback function for boost cache cleaner.

18 calls to boost_cache_cleaner_callback()
boost_cache_cleaner_form_block_admin_configure_submit in ./boost_cache_cleaner.module
Implements custom submit for Individual block configuration.
boost_cache_cleaner_form_block_admin_display_submit in ./boost_cache_cleaner.module
Implements custom submit for admin blocks display list.
boost_cache_cleaner_menu_delete in ./boost_cache_cleaner.module
Implements hook_menu_delete().
boost_cache_cleaner_menu_insert in ./boost_cache_cleaner.module
Implements hook_menu_insert().
boost_cache_cleaner_menu_link_delete in ./boost_cache_cleaner.module
Implements hook_menu_delete().

... See full list

File

./boost_cache_cleaner.module, line 162
Flush (delete all static) cached pages from cache directory.

Code

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();
    }
  }
}