Пример #1
0
 /**
  * Adds data to the url cache. This must run after $this->setRequestVariables().
  *
  * @param UrlCacheEntry $cacheEntry
  * @return void
  */
 protected function putToUrlCache(UrlCacheEntry $cacheEntry)
 {
     if (!$this->isExpiredPath) {
         $requestVariables = $cacheEntry->getRequestVariables();
         $requestVariables['id'] = $cacheEntry->getPageId();
         $this->sortArrayDeep($requestVariables);
         $originalUrl = $this->createQueryStringFromParameters($requestVariables);
         if ($this->canCacheUrl($originalUrl)) {
             $cacheEntry->setOriginalUrl($originalUrl);
             $cacheEntry->setRequestVariables($requestVariables);
             $cacheEntry->setRootPageId($this->rootPageId);
             $cacheEntry->setSpeakingUrl($this->speakingUri);
             $this->cache->putUrlToCache($cacheEntry);
         }
     }
 }
Пример #2
0
 /**
  * Adds data to the url cache. This must run after $this->setRequestVariables().
  *
  * @param UrlCacheEntry $cacheEntry
  * @return void
  */
 protected function putToUrlCache(UrlCacheEntry $cacheEntry)
 {
     if (!$this->isExpiredPath) {
         $requestVariables = $cacheEntry->getRequestVariables();
         $requestVariables['id'] = $cacheEntry->getPageId();
         $this->sortArrayDeep($requestVariables);
         $originalUrl = trim(GeneralUtility::implodeArrayForUrl('', $requestVariables), '&');
         if ($this->canCacheUrl($originalUrl)) {
             $cacheEntry->setOriginalUrl($originalUrl);
             $cacheEntry->setRequestVariables($requestVariables);
             $cacheEntry->setRootPageId($this->rootPageId);
             $cacheEntry->setSpeakingUrl($this->speakingUri);
             $this->cache->putUrlToCache($cacheEntry);
         }
     }
 }