Skip to content

Commit

Permalink
fix(Favorites): repair runtime cache population
Browse files Browse the repository at this point in the history
Signed-off-by: Arthur Schiwon <[email protected]>
  • Loading branch information
blizzz committed Jan 13, 2025
1 parent 97e78b3 commit 37a06f1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Service/FavoritesService.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use OCA\Tables\Errors\PermissionError;
use OCP\Cache\CappedMemoryCache;
use OCP\DB\Exception;
use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\IDBConnection;

class FavoritesService {
Expand Down Expand Up @@ -48,7 +49,7 @@ public function isFavorite(int $nodeType, int $id): bool {

$result = $qb->executeQuery();
while ($row = $result->fetch()) {
$this->cache->set($cacheKey, true);
$this->cache->set(sprintf('%d_%d', $row['node_type'], $row['node_id']), true);
}
}

Expand Down

0 comments on commit 37a06f1

Please sign in to comment.