* invalidate opcache while saving config file

This commit is contained in:
Max Pozdeev 2021-06-27 15:28:28 +03:00
parent 9ba479fe29
commit 6983fa1b72

View file

@ -165,14 +165,14 @@ class Config
if($f === false) throw new Exception("Error while saving config file");
fwrite($f, "<?php\n\$config = array();\n$s?>");
fclose($f);
/*
//Reset Zend OPcache
//opcache_get_status() sometimes crashes
//TODO: save config in database!
if (function_exists("opcache_invalidate") && 0 != (int)opcache_get_configuration()["directives"]["opcache.enable"]) {
opcache_invalidate(MTTPATH. 'db/config.php', true);
}
*/
}
}