Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 16 additions & 9 deletions src/includes/traits/Plugin/WcpUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ trait WcpUtils
*/
public function wipeCache($manually = false)
{
do_action('comet_cache_wipe_cache');

$counter = 0; // Initialize.

if (!$manually && $this->disableAutoWipeCacheRoutines()) {
Expand All @@ -40,11 +42,11 @@ public function wipeCache($manually = false)
$regex = $this->assembleCachePathRegex('', '.+');
$counter += $this->wipeFilesFromCacheDir($regex);
}








return $counter;
}

Expand All @@ -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()) {
Expand All @@ -81,11 +86,11 @@ public function clearCache($manually = false)
$regex = $this->buildHostCachePathRegex('', '.+');
$counter += $this->clearFilesFromHostCacheDir($regex);
}








return $counter;
}

Expand All @@ -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()) {
Expand All @@ -122,7 +129,7 @@ public function purgeCache($manually = false)
$regex = $this->buildHostCachePathRegex('', '.+');
$counter += $this->purgeFilesFromHostCacheDir($regex);
}

return $counter;
}

Expand Down Expand Up @@ -159,7 +166,7 @@ public function wurgeCache($manually = false)
$regex = $this->assembleCachePathRegex('', '.+');
$counter += $this->wurgeFilesFromCacheDir($regex);
}

return $counter;
}

Expand Down Expand Up @@ -380,4 +387,4 @@ public function disableAutoPurgeCacheRoutines()
}
return $is_disabled;
}
}
}