don't call xcache_clear_cache on clearOpcodeCache() in case admin auth is enabled for xcache in php.ini

This commit is contained in:
Thomas Müller 2013-08-09 22:13:31 +02:00
parent 4c0ec974b9
commit 507e48ee56
1 changed files with 5 additions and 1 deletions

View File

@ -869,7 +869,11 @@ class OC_Util {
} }
// XCache // XCache
if (function_exists('xcache_clear_cache')) { if (function_exists('xcache_clear_cache')) {
xcache_clear_cache(XC_TYPE_VAR, 0); if (ini_get('xcache.admin.enable_auth')) {
OC_Log::write('core', 'XCache will not be cleared because "xcache.admin.enable_auth" is enabled in php.ini.', \OC_Log::WARN);
} else {
xcache_clear_cache(XC_TYPE_VAR, 0);
}
} }
// Opcache (PHP >= 5.5) // Opcache (PHP >= 5.5)
if (function_exists('opcache_reset')) { if (function_exists('opcache_reset')) {