Null -> NullCache

This commit is contained in:
Thomas Müller 2015-06-11 00:44:13 +02:00
parent 48e915c7be
commit 3090348bf7
3 changed files with 4 additions and 6 deletions

View File

@ -29,7 +29,7 @@ namespace OC\Memcache;
use \OCP\ICacheFactory; use \OCP\ICacheFactory;
class Factory implements ICacheFactory { class Factory implements ICacheFactory {
const NULL_CACHE = '\\OC\\Memcache\\Null'; const NULL_CACHE = '\\OC\\Memcache\\NullCache';
/** /**
* @var string $globalPrefix * @var string $globalPrefix
@ -70,7 +70,7 @@ class Factory implements ICacheFactory {
} }
if (!($lockingCacheClass && $lockingCacheClass::isAvailable())) { if (!($lockingCacheClass && $lockingCacheClass::isAvailable())) {
// dont fallback since the fallback might not be suitable for storing lock // dont fallback since the fallback might not be suitable for storing lock
$lockingCacheClass = '\OC\Memcache\Null'; $lockingCacheClass = '\OC\Memcache\NullCache';
} }
$this->localCacheClass = $localCacheClass; $this->localCacheClass = $localCacheClass;
$this->distributedCacheClass = $distributedCacheClass; $this->distributedCacheClass = $distributedCacheClass;

View File

@ -22,7 +22,7 @@
namespace OC\Memcache; namespace OC\Memcache;
class Null extends Cache implements \OCP\IMemcache { class NullCache extends Cache implements \OCP\IMemcache {
public function get($key) { public function get($key) {
return null; return null;
} }

View File

@ -46,7 +46,6 @@ use OC\Lock\MemcacheLockingProvider;
use OC\Lock\NoopLockingProvider; use OC\Lock\NoopLockingProvider;
use OC\Mail\Mailer; use OC\Mail\Mailer;
use OC\Memcache\ArrayCache; use OC\Memcache\ArrayCache;
use OC\Memcache\Null as NullCache;
use OC\Http\Client\ClientService; use OC\Http\Client\ClientService;
use OC\Security\CertificateManager; use OC\Security\CertificateManager;
use OC\Files\Node\Root; use OC\Files\Node\Root;
@ -57,7 +56,6 @@ use OC\Security\SecureRandom;
use OC\Diagnostics\NullEventLogger; use OC\Diagnostics\NullEventLogger;
use OC\Security\TrustedDomainHelper; use OC\Security\TrustedDomainHelper;
use OCP\IServerContainer; use OCP\IServerContainer;
use OCP\ISession;
use OC\Tagging\TagMapper; use OC\Tagging\TagMapper;
/** /**
@ -429,7 +427,7 @@ class Server extends SimpleContainer implements IServerContainer {
/** @var \OC\Memcache\Factory $memcacheFactory */ /** @var \OC\Memcache\Factory $memcacheFactory */
$memcacheFactory = $c->getMemCacheFactory(); $memcacheFactory = $c->getMemCacheFactory();
$memcache = $memcacheFactory->createLocking('lock'); $memcache = $memcacheFactory->createLocking('lock');
if (!($memcache instanceof \OC\Memcache\Null)) { if (!($memcache instanceof \OC\Memcache\NullCache)) {
return new MemcacheLockingProvider($memcache); return new MemcacheLockingProvider($memcache);
} }
} }