Return cached item for homepage stats

MAILPOET-5439
This commit is contained in:
John Oleksowicz
2023-06-28 14:53:09 -05:00
committed by Aschepikov
parent 52dba60b7b
commit 8bf3eddf09

View File

@@ -92,7 +92,7 @@ class SubscribersCountsController {
}
public function getHomepageStatistics(): array {
$result = $this->getCacheItem(TransientCache::SUBSCRIBERS_HOMEPAGE_STATISTICS_COUNT_KEY, 0) ?? [];
$result = $this->getCacheItem(TransientCache::SUBSCRIBERS_HOMEPAGE_STATISTICS_COUNT_KEY, 0)['item'] ?? [];
if (!$result) {
$result = $this->recalculateHomepageStatisticsCache();
}