[TYPO3-dev] manually clear cache of my extension
Oliver Klee
typo3-german-02 at oliverklee.de
Thu Sep 11 19:01:21 CEST 2008
Hi Cyrill,
Cyrill Helg schrieb:
> How can I manually clear the cache of my extension? So that the cHash becomes
> outdated and the page is recreated? I need this because the content of the
> extension is updated by an import function which can be run as a cronjob.
I do it like this for the "realty" extension:
public static function clearFrontEndCacheForRealtyPages() {
$dbResult = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
'pid', 'tt_content', 'list_type="realty_pi1"'
);
if (!$dbResult) {
throw new Exception(DATABASE_QUERY_ERROR);
}
$pageIds = array();
while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($dbResult)) {
$pageIds[] = $row['pid'];
}
tslib_fe::clearPageCacheContent_pidList(implode(',', $pageIds));
}
Oliver
More information about the TYPO3-dev
mailing list