/** * Clears the page cache * * @param mixed $pageIdsToClear (int) single or (array) multiple pageIds to clear the cache for * @return void */ public function clearPageCache($pageIdsToClear = null) { if ($pageIdsToClear === null) { $this->cacheManager->flushCachesInGroup('pages'); } else { if (!is_array($pageIdsToClear)) { $pageIdsToClear = array((int) $pageIdsToClear); } foreach ($pageIdsToClear as $pageId) { $this->cacheManager->flushCachesInGroupByTag('pages', 'pageId_' . $pageId); } } }
/** * Flushes all caches in specified groups. * * @param array $groups * @throws NoSuchCacheGroupException */ public function flushGroups(array $groups) { $this->ensureCacheGroupsExist($groups); foreach ($groups as $group) { $this->cacheManager->flushCachesInGroup($group); } }
/** * Wrapper function for unloading extensions * * @param string $extensionKey * @return void */ protected function unloadExtension($extensionKey) { $this->packageManager->deactivatePackage($extensionKey); $this->cacheManager->flushCachesInGroup('system'); }