function onChange($oPage, $oPreviousContent = null) { $aoPagesNews = self::getNewsList($oPage); foreach ($aoPagesNews as $oPageNews) { AnwCache::clearCacheFromPageGroup($oPageNews->getPageGroup()); } }
static function updatePageGroup($oPageGroup) { self::debug("Updating a pagegroup : #" . $oPageGroup->getId()); self::getDriver()->updatePageGroup($oPageGroup); AnwCache::clearCacheFromPageGroup($oPageGroup); }
function onChange($oPage, $oPreviousContent = null) { //clear cache from previous categories, in case of news is no more under this category if ($oPreviousContent != null) { $aoPagesCategoriesPrevious = self::getCategoriesPages($oPreviousContent, $oPage); foreach ($aoPagesCategoriesPrevious as $oPageCategory) { AnwCache::clearCacheFromPageGroup($oPageCategory->getPageGroup()); } } //clear cache from current categories, in case news was not already under these categories $aoPagesCategoriesCurrent = self::getCategoriesPages($oPage->getContent(), $oPage); foreach ($aoPagesCategoriesCurrent as $oPageCategory) { AnwCache::clearCacheFromPageGroup($oPageCategory->getPageGroup()); } }