Use a CappedCache in the user database backend

When running with a user database backend on large installations the
cache can grow to significant sizes. This can be especially problematic
when running big cron/repair jobs.
This commit is contained in:
Roeland Jago Douma 2016-05-03 09:29:22 +02:00
parent adf7e7295e
commit 5ba6fe2983
No known key found for this signature in database
GPG Key ID: 1E152838F164D13B
1 changed files with 11 additions and 1 deletions

View File

@ -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