DmitryDulepov\Realurl\Encoder\UrlEncoder::canCacheUrl PHP Метод

canCacheUrl() защищенный Метод

Checks if the URL can be cached. This function may prevent RealURL cache pollution with Solr or Indexed search URLs. Also some doktypes are ignored for the cache.
protected canCacheUrl ( string $url ) : boolean
$url string
Результат boolean
    protected function canCacheUrl($url)
    {
        $bannedUrlsRegExp = $this->configuration->get('cache/banUrlsRegExp');
        $result = !$bannedUrlsRegExp || !preg_match($bannedUrlsRegExp, $url);
        if ($result) {
            // Check page type: do not cache separators
            $pageRecord = $this->pageRepository->getPage($this->urlParameters['id']);
            if (is_array($pageRecord) && ($pageRecord['doktype'] == PageRepository::DOKTYPE_SPACER || $pageRecord['doktype'] == PageRepository::DOKTYPE_RECYCLER)) {
                $result = false;
            }
        }
        return $result;
    }