diff options
author | Morris Jobke <hey@morrisjobke.de> | 2019-02-01 10:17:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-01 10:17:55 +0100 |
commit | 5fe151f7c4bcc5b4a92aa0c915aab5099d3ae691 (patch) | |
tree | 729467aaa2bacc812ef8395214b7a4b9e26be3e0 /lib/private/legacy | |
parent | 0d22ea71d89fd815e0b181b67aa29aabedac8b4f (diff) | |
parent | 9104e028a399ed2bbda63204c7627d75f9f5f381 (diff) | |
download | nextcloud-server-5fe151f7c4bcc5b4a92aa0c915aab5099d3ae691.tar.gz nextcloud-server-5fe151f7c4bcc5b4a92aa0c915aab5099d3ae691.zip |
Merge pull request #13927 from nextcloud/remove-dead-code
Don't call apc_delete_file and apc_clear_cache anymore
Diffstat (limited to 'lib/private/legacy')
-rw-r--r-- | lib/private/legacy/util.php | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/lib/private/legacy/util.php b/lib/private/legacy/util.php index 7ab13716547..9bada5bb733 100644 --- a/lib/private/legacy/util.php +++ b/lib/private/legacy/util.php @@ -1332,56 +1332,6 @@ class OC_Util { } /** - * Clear a single file from the opcode cache - * This is useful for writing to the config file - * in case the opcode cache does not re-validate files - * Returns true if successful, false if unsuccessful: - * caller should fall back on clearing the entire cache - * with clearOpcodeCache() if unsuccessful - * - * @param string $path the path of the file to clear from the cache - * @return bool true if underlying function returns true, otherwise false - */ - public static function deleteFromOpcodeCache($path) { - $ret = false; - if ($path) { - // APC >= 3.1.1 - if (function_exists('apc_delete_file')) { - $ret = @apc_delete_file($path); - } - // Zend OpCache >= 7.0.0, PHP >= 5.5.0 - if (function_exists('opcache_invalidate')) { - $ret = @opcache_invalidate($path); - } - } - return $ret; - } - - /** - * Clear the opcode cache if one exists - * This is necessary for writing to the config file - * in case the opcode cache does not re-validate files - * - * @return void - * @suppress PhanDeprecatedFunction - * @suppress PhanUndeclaredConstant - */ - public static function clearOpcodeCache() { - // APC - if (function_exists('apc_clear_cache')) { - apc_clear_cache(); - } - // Zend Opcache - if (function_exists('accelerator_reset')) { - accelerator_reset(); - } - // Opcache (PHP >= 5.5) - if (function_exists('opcache_reset')) { - @opcache_reset(); - } - } - - /** * Normalize a unicode string * * @param string $value a not normalized string |