diff --git a/lib/private/user/database.php b/lib/private/user/database.php
index 22a05090b96eab971c910f2977b2ebd620510403..fd273055ae18c2755dbd73969dbb8e904bf34c32 100644
--- a/lib/private/user/database.php
+++ b/lib/private/user/database.php
@@ -48,11 +48,21 @@
  *
  */
 
+use OC\Cache\CappedMemoryCache;
+
 /**
  * Class for user management in a SQL Database (e.g. MySQL, SQLite)
  */
 class OC_User_Database extends OC_User_Backend implements \OCP\IUserBackend {
-	private $cache = array();
+	/** @var CappedMemoryCache */
+	private $cache;
+
+	/**
+	 * OC_User_Database constructor.
+	 */
+	public function __construct() {
+		$this->cache = new CappedMemoryCache();
+	}
 
 	/**
 	 * Create a new user