diff --git a/src/Controller/StatisticsController.php b/src/Controller/StatisticsController.php index 928867e..7c6fb10 100644 --- a/src/Controller/StatisticsController.php +++ b/src/Controller/StatisticsController.php @@ -32,12 +32,13 @@ public function __invoke(): Statistics ->setDomainPurchased($this->pool->getItem('stats.domain.purchased')->get() ?? 0) ->setDomainPurchaseFailed($this->pool->getItem('stats.domain.purchase.failed')->get() ?? 0) ->setAlertSent($this->pool->getItem('stats.alert.sent')->get() ?? 0) + ->setDomainTracked( - $this->watchListRepository->createQueryBuilder('w') + $this->getCachedItem('stats.domain.tracked', fn () => $this->watchListRepository->createQueryBuilder('w') ->join('w.domains', 'd') ->select('COUNT(DISTINCT d.ldhName)') ->where('d.deleted = FALSE') - ->getQuery()->getSingleColumnResult()[0] + ->getQuery()->getSingleColumnResult()[0]) ) ->setDomainCount( $this->getCachedItem('stats.domain.count', fn () => $this->domainRepository->createQueryBuilder('d')