diff --git a/lib/private/memcache/factory.php b/lib/private/memcache/factory.php
index 5bb7e42c80846710acb6c2111cabbe131fc262a1..a3fc8dfe62cc93e200542dba5717be26e94e969d 100644
--- a/lib/private/memcache/factory.php
+++ b/lib/private/memcache/factory.php
@@ -29,6 +29,7 @@
 namespace OC\Memcache;
 
 use \OCP\ICacheFactory;
+use \OCP\ILogger;
 
 class Factory implements ICacheFactory {
 	const NULL_CACHE = '\\OC\\Memcache\\NullCache';
@@ -38,6 +39,11 @@ class Factory implements ICacheFactory {
 	 */
 	private $globalPrefix;
 
+	/**
+	 * @var ILogger $logger
+	 */
+	private $logger;
+
 	/**
 	 * @var string $localCacheClass
 	 */
@@ -55,13 +61,15 @@ class Factory implements ICacheFactory {
 
 	/**
 	 * @param string $globalPrefix
+	 * @param ILogger $logger
 	 * @param string|null $localCacheClass
 	 * @param string|null $distributedCacheClass
 	 * @param string|null $lockingCacheClass
 	 */
-	public function __construct($globalPrefix,
+	public function __construct($globalPrefix, ILogger $logger,
 		$localCacheClass = null, $distributedCacheClass = null, $lockingCacheClass = null)
 	{
+		$this->logger = $logger;
 		$this->globalPrefix = $globalPrefix;
 
 		if (!$localCacheClass) {
@@ -71,22 +79,43 @@ class Factory implements ICacheFactory {
 			$distributedCacheClass = $localCacheClass;
 		}
 
+		$missingCacheMessage = 'Memcache {class} not available for {use} cache';
+		$missingCacheHint = 'Is the matching PHP module installed and enabled?';
 		if (!$localCacheClass::isAvailable()) {
-			throw new \OC\HintException(
-				'Missing memcache class ' . $localCacheClass . ' for local cache',
-				'Is the matching PHP module installed and enabled ?'
-			);
+			if (\OC::$CLI) {
+				// CLI should not hard-fail on broken memcache
+				$this->logger->info($missingCacheMessage, [
+					'class' => $localCacheClass,
+					'use' => 'local',
+					'app' => 'cli'
+				]);
+				$localCacheClass = self::NULL_CACHE;
+			} else {
+				throw new \OC\HintException(strtr($missingCacheMessage, [
+					'{class}' => $localCacheClass, '{use}' => 'local'
+				]), $missingCacheHint);
+			}
 		}
 		if (!$distributedCacheClass::isAvailable()) {
-			throw new \OC\HintException(
-				'Missing memcache class ' . $distributedCacheClass . ' for distributed cache',
-				'Is the matching PHP module installed and enabled ?'
-			);
+			if (\OC::$CLI) {
+				// CLI should not hard-fail on broken memcache
+				$this->logger->info($missingCacheMessage, [
+					'class' => $distributedCacheClass,
+					'use' => 'distributed',
+					'app' => 'cli'
+				]);
+				$distributedCacheClass = self::NULL_CACHE;
+			} else {
+				throw new \OC\HintException(strtr($missingCacheMessage, [
+					'{class}' => $distributedCacheClass, '{use}' => 'distributed'
+				]), $missingCacheHint);
+			}
 		}
 		if (!($lockingCacheClass && $lockingCacheClass::isAvailable())) {
 			// dont fallback since the fallback might not be suitable for storing lock
-			$lockingCacheClass = '\OC\Memcache\NullCache';
+			$lockingCacheClass = self::NULL_CACHE;
 		}
+
 		$this->localCacheClass = $localCacheClass;
 		$this->distributedCacheClass = $distributedCacheClass;
 		$this->lockingCacheClass = $lockingCacheClass;
diff --git a/lib/private/server.php b/lib/private/server.php
index 84141fe28c196337045a8ead95c1053d325d84d3..a3043f943ca8902aefe4b1d1cd087868049731ad 100644
--- a/lib/private/server.php
+++ b/lib/private/server.php
@@ -234,14 +234,14 @@ class Server extends SimpleContainer implements IServerContainer {
 				$instanceId = \OC_Util::getInstanceId();
 				$path = \OC::$SERVERROOT;
 				$prefix = md5($instanceId.'-'.$version.'-'.$path);
-				return new \OC\Memcache\Factory($prefix,
+				return new \OC\Memcache\Factory($prefix, $c->getLogger(),
 					$config->getSystemValue('memcache.local', null),
 					$config->getSystemValue('memcache.distributed', null),
 					$config->getSystemValue('memcache.locking', null)
 				);
 			}
 
-			return new \OC\Memcache\Factory('',
+			return new \OC\Memcache\Factory('', $c->getLogger(),
 				new ArrayCache(),
 				new ArrayCache(),
 				new ArrayCache()