use the database backend for locking if no memcache is configured for it

This commit is contained in:
Robin Appelman 2015-07-15 16:14:48 +02:00
parent 4ea7cbb0f5
commit 86acd535c2
1 changed files with 2 additions and 4 deletions

View File

@ -48,6 +48,7 @@ use OC\Diagnostics\QueryLogger;
use OC\Files\Node\Root; use OC\Files\Node\Root;
use OC\Files\View; use OC\Files\View;
use OC\Http\Client\ClientService; use OC\Http\Client\ClientService;
use OC\Lock\DBLockingProvider;
use OC\Lock\MemcacheLockingProvider; use OC\Lock\MemcacheLockingProvider;
use OC\Lock\NoopLockingProvider; use OC\Lock\NoopLockingProvider;
use OC\Mail\Mailer; use OC\Mail\Mailer;
@ -434,10 +435,7 @@ class Server extends SimpleContainer implements IServerContainer {
if (!($memcache instanceof \OC\Memcache\NullCache)) { if (!($memcache instanceof \OC\Memcache\NullCache)) {
return new MemcacheLockingProvider($memcache); return new MemcacheLockingProvider($memcache);
} }
throw new HintException( return new DBLockingProvider($c->getDatabaseConnection());
'File locking is enabled but the locking cache class was not found',
'Please check the "memcache.locking" setting and make sure the matching PHP module is installed and enabled'
);
} }
return new NoopLockingProvider(); return new NoopLockingProvider();
}); });