diff --git a/boost_cache_cleaner.module b/boost_cache_cleaner.module
index f048c7f..305b058 100644
--- a/boost_cache_cleaner.module
+++ b/boost_cache_cleaner.module
@@ -162,6 +162,16 @@ function boost_cache_cleaner_theme_settings_submit($form, &$form_state) {
 function boost_cache_cleaner_callback() {
   // Check if user has access to this function.
   if (!user_is_anonymous()) {
-    boost_flush_caches();
+    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();
+    }
   }
 }
