Skip to content

Commit f5a70fc

Browse files
committed
fix(BookmarkPreviewer): Do not store guaranteed null responses in cache
when cacheOnly === true Signed-off-by: Marcel Klehr <mklehr@gmx.net>
1 parent 5f52279 commit f5a70fc

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lib/Service/BookmarkPreviewer.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,14 @@ public function getImage($bookmark, $cacheOnly = false): ?IImage {
9999
} catch (NotFoundException $e) {
100100
} catch (NotPermittedException $e) {
101101
}
102+
if ($cacheOnly) {
103+
continue;
104+
}
102105
$image = $previewer->getImage($bookmark, $cacheOnly);
103106
if (isset($image)) {
104107
$this->cache->set($key, $image->serialize(), self::CACHE_TTL);
105108
return $image;
106109
}
107-
108110
$this->cache->set($key, 'null', self::CACHE_TTL);
109111
}
110112

0 commit comments

Comments
 (0)