aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Müller <DeepDiver1975@users.noreply.github.com>2016-05-03 11:54:21 +0200
committerThomas Müller <DeepDiver1975@users.noreply.github.com>2016-05-03 11:54:21 +0200
commit66bc0927243b9ede23a037436695605d531c3bd2 (patch)
tree5c5068bd6612fd3996d61859268b5d03ee0330b5
parent3f944753e6712d63b3b89dd2060c586c1277f621 (diff)
parent5ba6fe29835f27b1fd3740f252ece47e97fb1dd4 (diff)
downloadnextcloud-server-66bc0927243b9ede23a037436695605d531c3bd2.tar.gz
nextcloud-server-66bc0927243b9ede23a037436695605d531c3bd2.zip
Merge pull request #24405 from owncloud/user_db_capped_cache
Use a CappedCache in the user database backend
-rw-r--r--lib/private/user/database.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/private/user/database.php b/lib/private/user/database.php
index 22a05090b96..fd273055ae1 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