diff --git a/lib/base.php b/lib/base.php index e856574942..6751f897df 100644 --- a/lib/base.php +++ b/lib/base.php @@ -475,23 +475,9 @@ class OC { @ini_set('file_uploads', '50'); self::handleAuthHeaders(); - self::initPaths(); + self::registerAutoloaderCache(); - // The class loader takes an optional low-latency cache, which MUST be - // namespaced. The instanceid is used for namespacing, but might be - // unavailable at this point. Futhermore, it might not be possible to - // generate an instanceid via \OC_Util::getInstanceId() because the - // config file may not be writable. As such, we only register a class - // loader cache if instanceid is available without trying to create one. - $instanceId = OC_Config::getValue('instanceid', null); - if ($instanceId) { - try { - $memcacheFactory = new \OC\Memcache\Factory($instanceId); - self::$loader->setMemoryCache($memcacheFactory->createLowLatency('Autoloader')); - } catch (\Exception $ex) { - } - } OC_Util::isSetLocaleWorking(); // setup 3rdparty autoloader @@ -651,6 +637,23 @@ class OC { } } + protected static function registerAutoloaderCache() { + // The class loader takes an optional low-latency cache, which MUST be + // namespaced. The instanceid is used for namespacing, but might be + // unavailable at this point. Futhermore, it might not be possible to + // generate an instanceid via \OC_Util::getInstanceId() because the + // config file may not be writable. As such, we only register a class + // loader cache if instanceid is available without trying to create one. + $instanceId = OC_Config::getValue('instanceid', null); + if ($instanceId) { + try { + $memcacheFactory = new \OC\Memcache\Factory($instanceId); + self::$loader->setMemoryCache($memcacheFactory->createLowLatency('Autoloader')); + } catch (\Exception $ex) { + } + } + } + /** * Handle the request */