28 if (isset(self::$staticCache[$this->chat->getId()]))
30 return self::$staticCache[$this->chat->getId()];
34 if ($cache->initCache(self::CACHE_TTL, $this->getCacheId(), $this->getCacheDir()))
36 $cachedGuestCount = $cache->getVars();
38 if (!is_array($cachedGuestCount))
40 $cachedGuestCount = [];
43 return self::$staticCache[$this->chat->getId()] = $cachedGuestCount[
'guestCount'] ?? 0;
48 $cache->startDataCache();
49 $cache->endDataCache([
'guestCount' => self::$staticCache[$this->chat->getId()]]);
51 return self::$staticCache[$this->chat->getId()];