Ejemplo n.º 1
0
 /**
  * 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);
         }
     }
 }
Ejemplo n.º 2
0
 /**
  * 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);
     }
 }
Ejemplo n.º 3
0
 /**
  * Wrapper function for unloading extensions
  *
  * @param string $extensionKey
  * @return void
  */
 protected function unloadExtension($extensionKey)
 {
     $this->packageManager->deactivatePackage($extensionKey);
     $this->cacheManager->flushCachesInGroup('system');
 }