summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@owncloud.com>2013-10-21 15:21:37 +0200
committerAndreas Fischer <bantu@owncloud.com>2013-10-22 11:17:15 +0200
commitf5e2b92688b269f83e401f8e92758e60d92384d2 (patch)
tree98338202816ee1cae5cca85519e670259e36131a /lib
parenteb6637682ec835d9ec50612b59637e8b9ff5f6f6 (diff)
downloadnextcloud-server-f5e2b92688b269f83e401f8e92758e60d92384d2.tar.gz
nextcloud-server-f5e2b92688b269f83e401f8e92758e60d92384d2.zip
Only use autoloader cache when 'instanceid' is available.
Diffstat (limited to 'lib')
-rw-r--r--lib/base.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/base.php b/lib/base.php
index 53ea28b46b4..83417c52a59 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -371,11 +371,6 @@ class OC {
// register autoloader
require_once __DIR__ . '/autoloader.php';
self::$loader = new \OC\Autoloader();
- spl_autoload_register(array(self::$loader, 'load'));
- try {
- self::$loader->setMemoryCache(\OC\Memcache\Factory::createLowLatency('Autoloader'));
- } catch(\Exception $ex) {
- }
self::$loader->registerPrefix('Doctrine\\Common', 'doctrine/common/lib');
self::$loader->registerPrefix('Doctrine\\DBAL', 'doctrine/dbal/lib');
self::$loader->registerPrefix('Symfony\\Component\\Routing', 'symfony/routing');
@@ -383,6 +378,7 @@ class OC {
self::$loader->registerPrefix('Sabre\\VObject', '3rdparty');
self::$loader->registerPrefix('Sabre_', '3rdparty');
self::$loader->registerPrefix('Patchwork', '3rdparty');
+ spl_autoload_register(array(self::$loader, 'load'));
// set some stuff
//ob_start();
@@ -438,6 +434,14 @@ class OC {
}
self::initPaths();
+ if (OC_Config::getValue('instanceid', false)) {
+ // \OC\Memcache\Cache has a hidden dependency on
+ // OC_Util::getInstanceId() for namespacing. See #5409.
+ try {
+ self::$loader->setMemoryCache(\OC\Memcache\Factory::createLowLatency('Autoloader'));
+ } catch(\Exception $ex) {
+ }
+ }
OC_Util::isSetLocaleWorking();
// set debug mode if an xdebug session is active