diff --git a/system/functions.php b/system/functions.php index 7cce4d54..7a807c72 100644 --- a/system/functions.php +++ b/system/functions.php @@ -1254,6 +1254,9 @@ function clearCache() // routes cache clearRouteCache(); + global $hooks; + $hooks->trigger(HOOK_CACHE_CLEAR, ['cache' => Cache::getInstance()]); + return true; } diff --git a/system/src/global.php b/system/src/global.php index 161185b7..3700dee6 100644 --- a/system/src/global.php +++ b/system/src/global.php @@ -73,6 +73,7 @@ define('HOOK_GUILDS_AFTER_GUILD_INFORMATION', ++$i); define('HOOK_GUILDS_AFTER_GUILD_MEMBERS', ++$i); define('HOOK_GUILDS_AFTER_INVITED_CHARACTERS', ++$i); define('HOOK_TWIG', ++$i); +define('HOOK_CACHE_CLEAR', ++$i); const HOOK_FIRST = HOOK_STARTUP; define('HOOK_LAST', $i);