From 6c4898b923d376986c5e2e37c4a7343ea90b978c Mon Sep 17 00:00:00 2001 From: Max Pozdeev Date: Mon, 24 Aug 2020 20:25:28 +0300 Subject: [PATCH] experiments: avoid opcode cache --- src/common.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/common.php b/src/common.php index 36ad778..aa0dd91 100644 --- a/src/common.php +++ b/src/common.php @@ -142,6 +142,14 @@ class Config if($f === false) throw new Exception("Error while saving config file"); fwrite($f, ""); 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); + } + */ } }