]> source.dussan.org Git - nextcloud-server.git/commitdiff
Revert "add debug log for memcache instantiation"
authorLukas Reschke <lukas@owncloud.com>
Wed, 18 Feb 2015 13:16:14 +0000 (14:16 +0100)
committerLukas Reschke <lukas@owncloud.com>
Wed, 18 Feb 2015 13:16:14 +0000 (14:16 +0100)
lib/base.php
lib/private/memcache/factory.php
lib/private/server.php

index cdc662c28d968f1b70cb7549265f30fbc9634af7..87eb746ff4bd2a787ca3b5aea1ee11c7bb68531c 100644 (file)
@@ -727,8 +727,7 @@ class OC {
                $instanceId = \OC::$server->getSystemConfig()->getValue('instanceid', null);
                if ($instanceId) {
                        try {
-                               $memcacheFactory = new \OC\Memcache\Factory($instanceId,
-                                       \OC::$server->getLogger());
+                               $memcacheFactory = new \OC\Memcache\Factory($instanceId);
                                self::$loader->setMemoryCache($memcacheFactory->createLowLatency('Autoloader'));
                        } catch (\Exception $ex) {
                        }
index 537054a30f62817d25f1b5849d056f7a7b63db48..e8a91c522691a81df70e2d71167ff42b0b2fbdf3 100644 (file)
@@ -11,19 +11,16 @@ namespace OC\Memcache;
 use \OCP\ICacheFactory;
 
 class Factory implements ICacheFactory {
-       /** @var string $globalPrefix */
+       /**
+        * @var string $globalPrefix
+        */
        private $globalPrefix;
 
-       /** @var \OCP\ILogger */
-       private $logger;
-
        /**
         * @param string $globalPrefix
-        * @param \OCP\ILogger $logger
         */
-       public function __construct($globalPrefix, $logger) {
+       public function __construct($globalPrefix) {
                $this->globalPrefix = $globalPrefix;
-               $this->logger = $logger;
        }
 
        /**
@@ -35,22 +32,16 @@ class Factory implements ICacheFactory {
        function create($prefix = '') {
                $prefix = $this->globalPrefix . '/' . $prefix;
                if (XCache::isAvailable()) {
-                       $this->logger->debug("creating XCache instance", array('app' => 'memcache'));
                        return new XCache($prefix);
                } elseif (APCu::isAvailable()) {
-                       $this->logger->debug('creating APCu instance', array('app'=>'memcache'));
                        return new APCu($prefix);
                } elseif (APC::isAvailable()) {
-                       $this->logger->debug('creating APC instance', array('app'=>'memcache'));
                        return new APC($prefix);
                } elseif (Redis::isAvailable()) {
-                       $this->logger->debug('creating redis instance', array('app'=>'memcache'));
                        return new Redis($prefix);
                } elseif (Memcached::isAvailable()) {
-                       $this->logger->debug('creating memcached instance', array('app'=>'memcache'));
                        return new Memcached($prefix);
                } else {
-                       $this->logger->debug('no cache available instance', array('app'=>'memcache'));
                        return new ArrayCache($prefix);
                }
        }
@@ -73,16 +64,12 @@ class Factory implements ICacheFactory {
        public function createLowLatency($prefix = '') {
                $prefix = $this->globalPrefix . '/' . $prefix;
                if (XCache::isAvailable()) {
-                       $this->logger->debug('creating xcache instance for low latency', array('app'=>'memcache'));
                        return new XCache($prefix);
                } elseif (APCu::isAvailable()) {
-                       $this->logger->debug('creating APCu instance for low latency', array('app'=>'memcache'));
                        return new APCu($prefix);
                } elseif (APC::isAvailable()) {
-                       $this->logger->debug('creating APC instance for low latency', array('app'=>'memcache'));
                        return new APC($prefix);
                } else {
-                       $this->logger->debug('no low latency cache available', array('app'=>'memcache'));
                        return null;
                }
        }
@@ -96,4 +83,5 @@ class Factory implements ICacheFactory {
                return XCache::isAvailable() || APCu::isAvailable() || APC::isAvailable();
        }
 
+
 }
index 7c7f3c25cc862b7d67f6265677406628fa03dbe2..5eaecc00932bc35f08207ea886b89f5bf818c323 100644 (file)
@@ -155,8 +155,7 @@ class Server extends SimpleContainer implements IServerContainer {
                });
                $this->registerService('MemCacheFactory', function ($c) {
                        $instanceId = \OC_Util::getInstanceId();
-                       $logger = $c['Logger'];
-                       return new \OC\Memcache\Factory($instanceId, $logger);
+                       return new \OC\Memcache\Factory($instanceId);
                });
                $this->registerService('ActivityManager', function ($c) {
                        return new ActivityManager();