示例#1
0
 /**
  * Clears path and URL caches if the page was deleted.
  *
  * @param string $table
  * @param string|int $id
  */
 public function processCmdmap_deleteAction($table, $id)
 {
     if (($table === 'pages' || $table === 'pages_language_overlay') && MathUtility::canBeInterpretedAsInteger($id)) {
         $this->cache->clearPathCacheForPage((int) $id);
         $this->cache->clearUrlCacheForPage((int) $id);
         $this->clearUrlCacheForAliasChanges($table, (int) $id);
     }
 }
示例#2
0
 /**
  * Expires path cache fo the page and subpages.
  *
  * @param int $pageId
  * @param int $languageId
  * @return void
  */
 protected function expireCachesForPageAndSubpages($pageId, $languageId)
 {
     $this->cache->expirePathCache($pageId, $languageId);
     $this->cache->clearUrlCacheForPage($pageId);
     $subpages = BackendUtility::getRecordsByField('pages', 'pid', $pageId);
     $uidList = array();
     foreach ($subpages as $subpage) {
         $uidList[] = (int) $subpage['uid'];
     }
     unset($subpages);
     foreach ($uidList as $uid) {
         $this->cache->expirePathCache($uid, $languageId);
         $this->expireCachesForPageAndSubpages($uid, $languageId);
     }
 }