fix: integration tests

Signed-off-by: Luka Trovic <luka@nextcloud.com>
This commit is contained in:
Luka Trovic
2022-03-08 10:27:06 +01:00
committed by Julius Härtl
parent 989db4702c
commit c7c9302109
4 changed files with 46 additions and 9 deletions

View File

@@ -318,4 +318,25 @@ class BoardMapper extends DeckMapper implements IPermissionMapper {
$stmt = $this->db->executeQuery($sql, $params);
$stmt->closeCursor();
}
/**
* Reset Cache for a
* given board or a given user
*
* @param int|null $boardId
* @param int|null $userId
*/
public function flushCache(?int $boardId = null, ?string $userId = null)
{
if ($boardId) {
unset($this->boardCache[$boardId]);
} else {
$this->boardCache = null;
}
if ($userId) {
unset($this->userBoardCache[$userId]);
} else {
$this->userBoardCache = null;
}
}
}