diff --git a/src/includes/traits/Plugin/WcpUtils.php b/src/includes/traits/Plugin/WcpUtils.php index 2bdf1a4..1ec5d27 100644 --- a/src/includes/traits/Plugin/WcpUtils.php +++ b/src/includes/traits/Plugin/WcpUtils.php @@ -29,6 +29,8 @@ trait WcpUtils */ public function wipeCache($manually = false) { + do_action('comet_cache_wipe_cache'); + $counter = 0; // Initialize. if (!$manually && $this->disableAutoWipeCacheRoutines()) { @@ -40,11 +42,11 @@ public function wipeCache($manually = false) $regex = $this->assembleCachePathRegex('', '.+'); $counter += $this->wipeFilesFromCacheDir($regex); } - - - + + + return $counter; } @@ -70,6 +72,9 @@ public function wipe_cache() */ public function clearCache($manually = false) { + + do_action('comet_cache_clear_cache'); + $counter = 0; // Initialize. if (!$manually && $this->disableAutoClearCacheRoutines()) { @@ -81,11 +86,11 @@ public function clearCache($manually = false) $regex = $this->buildHostCachePathRegex('', '.+'); $counter += $this->clearFilesFromHostCacheDir($regex); } - - - + + + return $counter; } @@ -111,6 +116,8 @@ public function clear_cache() */ public function purgeCache($manually = false) { + do_action('comet_cache_purge_cache'); + $counter = 0; // Initialize. if (!$manually && $this->disableAutoPurgeCacheRoutines()) { @@ -122,7 +129,7 @@ public function purgeCache($manually = false) $regex = $this->buildHostCachePathRegex('', '.+'); $counter += $this->purgeFilesFromHostCacheDir($regex); } - + return $counter; } @@ -159,7 +166,7 @@ public function wurgeCache($manually = false) $regex = $this->assembleCachePathRegex('', '.+'); $counter += $this->wurgeFilesFromCacheDir($regex); } - + return $counter; } @@ -380,4 +387,4 @@ public function disableAutoPurgeCacheRoutines() } return $is_disabled; } -} +} \ No newline at end of file