/** * Gets the events that need to be cleaned when the content is updated. */ protected function getCleanCacheEvents() { $this->assertContent(); //we have an event // clear cache of affected sections $events = $this->content->getParentIds(true); $section_contenttype = vB_Types::instance()->getContentTypeID('vBCms_Section'); foreach ($events AS &$sectionid) { $sectionid = 'content_' . $section_contenttype . '_' . $sectionid; } $events[] = 'vbcms_item_' . $this->content->getNodeId() . '_updated'; return array_merge($events, $this->content->getCacheEvents()); }
/** * Gets a consistent key for cache events. * * @return array string */ public function getCacheEvents() { $events = parent::getCacheEvents(); if ($thread = $this->getAssociatedThreadId()) { $events[] = "cms_comments_change_$thread"; } return $events; }