Skip to content

Commit

Permalink
Update GeophotoService.php: clearCache
Browse files Browse the repository at this point in the history
Always return success as clearing an empty cache/queue would falsely report an error.

Signed-off-by: umgfoin <[email protected]>
  • Loading branch information
umgfoin committed Jan 10, 2025
1 parent 201f931 commit 21c6bae
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/Service/GeophotoService.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ public function __construct(
* @return bool
*/
public function clearCache(string $userId = ''): bool {
$a = $this->photosCache->clear($userId);
$b = $this->timeOrderedPointSetsCache->clear($userId);
$c = $this->backgroundJobCache->clear('recentlyAdded:'.$userId);
$d = $this->backgroundJobCache->clear('recentlyUpdated:'.$userId);
return $a and $b and $c and $d;
$this->photosCache->clear($userId);
$this->timeOrderedPointSetsCache->clear($userId);
$this->backgroundJobCache->clear('recentlyAdded:'.$userId);
$this->backgroundJobCache->clear('recentlyUpdated:'.$userId);
return true;
}

/**
Expand Down

0 comments on commit 21c6bae

Please sign in to comment.