diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-02-18 14:16:14 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-02-18 14:16:14 +0100 |
commit | cd4c064ebf13218ce43940928041efac4c5f46ad (patch) | |
tree | b4054d95a6f8c8494f952e981c2cb5b5d82b11e5 /lib/private/memcache | |
parent | caa6d3e2db27390a4fc591f563ab05bad7cc3c70 (diff) | |
download | nextcloud-server-cd4c064ebf13218ce43940928041efac4c5f46ad.tar.gz nextcloud-server-cd4c064ebf13218ce43940928041efac4c5f46ad.zip |
Revert "add debug log for memcache instantiation"
Diffstat (limited to 'lib/private/memcache')
-rw-r--r-- | lib/private/memcache/factory.php | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/lib/private/memcache/factory.php b/lib/private/memcache/factory.php index 537054a30f6..e8a91c52269 100644 --- a/lib/private/memcache/factory.php +++ b/lib/private/memcache/factory.php @@ -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(); } + } |