Skip to content

Commit 25c0bac

Browse files
committed
Cache clear hook
1 parent 9a749af commit 25c0bac

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

system/functions.php

+3
Original file line numberDiff line numberDiff line change
@@ -1254,6 +1254,9 @@ function clearCache()
12541254
// routes cache
12551255
clearRouteCache();
12561256

1257+
global $hooks;
1258+
$hooks->trigger(HOOK_CACHE_CLEAR, ['cache' => Cache::getInstance()]);
1259+
12571260
return true;
12581261
}
12591262

system/src/global.php

+1
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
define('HOOK_GUILDS_AFTER_GUILD_MEMBERS', ++$i);
7474
define('HOOK_GUILDS_AFTER_INVITED_CHARACTERS', ++$i);
7575
define('HOOK_TWIG', ++$i);
76+
define('HOOK_CACHE_CLEAR', ++$i);
7677

7778
const HOOK_FIRST = HOOK_STARTUP;
7879
define('HOOK_LAST', $i);

0 commit comments

Comments
 (0)