Skip to content
Snippets Groups Projects
Unverified Commit 5ba6fe29 authored by Roeland Jago Douma's avatar Roeland Jago Douma
Browse files

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.
parent adf7e729
No related branches found
No related tags found
No related merge requests found
...@@ -48,11 +48,21 @@ ...@@ -48,11 +48,21 @@
* *
*/ */
use OC\Cache\CappedMemoryCache;
/** /**
* Class for user management in a SQL Database (e.g. MySQL, SQLite) * Class for user management in a SQL Database (e.g. MySQL, SQLite)
*/ */
class OC_User_Database extends OC_User_Backend implements \OCP\IUserBackend { 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 * Create a new user
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment