Bug #25106 » 17673-extbase.diff
typo3/sysext/extbase/Classes/Utility/Cache.php (working copy) | ||
---|---|---|
}
|
||
/**
|
||
* Flushes cache_pages or cachinframework_cache_pages.
|
||
* Flushes cachingframework_cache_pages.
|
||
*
|
||
* @param array $pageIdsToClear pageIds to clear the cache for
|
||
* @return void
|
||
*/
|
||
static protected function flushPageCache($pageIds = NULL) {
|
||
if (TYPO3_UseCachingFramework) {
|
||
$pageCache = $GLOBALS['typo3CacheManager']->getCache('cache_pages');
|
||
$pageCache = $GLOBALS['typo3CacheManager']->getCache('cache_pages');
|
||
if ($pageIds !== NULL) {
|
||
foreach ($pageIds as $pageId) {
|
||
$pageCache->flushByTag('pageId_' . $pageId);
|
||
}
|
||
} else {
|
||
$pageCache->flush();
|
||
if ($pageIds !== NULL) {
|
||
foreach ($pageIds as $pageId) {
|
||
$pageCache->flushByTag('pageId_' . $pageId);
|
||
}
|
||
} elseif ($pageIds !== NULL) {
|
||
$GLOBALS['TYPO3_DB']->exec_DELETEquery(
|
||
'cache_pages',
|
||
'page_id IN (' . implode(',', $GLOBALS['TYPO3_DB']->cleanIntArray($pageIds)) . ')'
|
||
);
|
||
} else {
|
||
$GLOBALS['TYPO3_DB']->exec_TRUNCATEquery('cache_pages');
|
||
$pageCache->flush();
|
||
}
|
||
}
|
||
/**
|
||
* Flushes cache_pagesection or cachingframework_cache_pagesection.
|
||
* Flushes cachingframework_cache_pagesection.
|
||
*
|
||
* @param array $pageIdsToClear pageIds to clear the cache for
|
||
* @return void
|
||
*/
|
||
static protected function flushPageSectionCache($pageIds = NULL) {
|
||
if (TYPO3_UseCachingFramework) {
|
||
$pageSectionCache = $GLOBALS['typo3CacheManager']->getCache('cache_pagesection');
|
||
$pageSectionCache = $GLOBALS['typo3CacheManager']->getCache('cache_pagesection');
|
||
if ($pageIds !== NULL) {
|
||
foreach ($pageIds as $pageId) {
|
||
$pageSectionCache->flushByTag('pageId_' . $pageId);
|
||
}
|
||
} else {
|
||
$pageSectionCache->flush();
|
||
if ($pageIds !== NULL) {
|
||
foreach ($pageIds as $pageId) {
|
||
$pageSectionCache->flushByTag('pageId_' . $pageId);
|
||
}
|
||
} elseif ($pageIds !== NULL) {
|
||
$GLOBALS['TYPO3_DB']->exec_DELETEquery(
|
||
'cache_pagesection',
|
||
'page_id IN (' . implode(',', $GLOBALS['TYPO3_DB']->cleanIntArray($pageIds)) . ')'
|
||
);
|
||
} else {
|
||
$GLOBALS['TYPO3_DB']->exec_TRUNCATEquery('cache_pagesection');
|
||
$pageSectionCache->flush();
|
||
}
|
||
}
|
||
}
|
||
?>
|
||
?>
|