fix: move shares count cache logic to the DeckShareProvider

Signed-off-by: Luka Trovic <luka@nextcloud.com>

fix: conflicts

Signed-off-by: Luka Trovic <luka@nextcloud.com>

fix: conflicts and test issues

Signed-off-by: Luka Trovic <luka@nextcloud.com>
This commit is contained in:
Luka Trovic
2022-04-29 14:21:22 +02:00
committed by Julius Härtl
parent 0b6990f828
commit ed3be361b5
4 changed files with 197 additions and 17 deletions

View File

@@ -137,7 +137,7 @@ class AttachmentService {
/**
* @param $cardId
* @param bool $update | Force the update of the cached values
* @param bool $update | Force the update of the cached values
* @return int|mixed
* @throws BadRequestException
*/
@@ -147,7 +147,7 @@ class AttachmentService {
}
$count = $this->cache->get('card-' . $cardId);
if ($update OR !$count) {
if ($update || !$count) {
$count = count($this->attachmentMapper->findAll($cardId));
foreach (array_keys($this->services) as $attachmentType) {