[core] cache event listeners based on which extensions are enabled + version number

This commit is contained in:
Shish 2023-12-31 15:44:35 +00:00
parent 42fc180c25
commit e3c61b72dc

View file

@ -21,9 +21,10 @@ function _load_event_listeners(): void
{
global $_shm_event_listeners;
$ver = preg_replace("/[^a-zA-Z0-9\.]/", "_", VERSION);
$key = md5(Extension::get_enabled_extensions_as_string());
$cache_path = data_path("cache/shm_event_listeners.$key.php");
$cache_path = data_path("cache/event_listeners/el.$ver.$key.php");
if (SPEED_HAX && file_exists($cache_path)) {
require_once($cache_path);
} else {