protected function isCachedById(int $id, int $siteId = null)
    {
        // Resolve siteId
        $siteId = SiteHelper::resolveSiteId($siteId);

        if (!isset($this->cacheById[$siteId])) {
            $this->cacheById[$siteId] = [];
        }

        return array_key_exists($id, $this->cacheById[$siteId]);
    }
protected function isCachedById(int $id, int $siteId = null)
    {
        // Resolve siteId
        $siteId = SiteHelper::resolveSiteId($siteId);

        if (!isset($this->cacheById[$siteId])) {
            $this->cacheById[$siteId] = [];
        }

        return array_key_exists($id, $this->cacheById[$siteId]);
    }
protected function isCachedById ( int $ id , int $ siteId = null ) { // Resolve siteId $ siteId = SiteHelper :: resolveSiteId ( $ siteId ) ; if ( ! isset ( $ this -> cacheById [ $ siteId ] ) ) { $ this -> cacheById [ $ siteId ] = [ ] ; } return array_key_exists ( $ id , $ this -> cacheById [ $ siteId ] ) ; }
Identify whether in cached by ID

@param int $id
@param int|null $siteId
@return bool
Identify whether in cached by ID