diff --git a/lib/util.php b/lib/util.php index b7dc2207e6..53ebe02472 100755 --- a/lib/util.php +++ b/lib/util.php @@ -869,7 +869,11 @@ class OC_Util { } // XCache 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) if (function_exists('opcache_reset')) {