[TYPO3-dev] Clear cache useHashCash in typo3 4.7.12

Иван i-litovan at yandex.ru
Mon Jul 15 00:55:01 CEST 2013


Hi,

I can clear cache page - cmd command...
$tce = t3lib_div::makeInstance('t3lib_TCEmain');
$tce->clear_cacheCmd('all');

And , how I can clear useHashCash in typo3 4.7.12 - cashe my FE plugin?
This next code working only old typo3 version:

function clearSpecificCache($pid, $cHash=false) {
    if(is_array($pid)) {
        $GLOBALS['TYPO3_DB']->exec_DELETEquery('cache_pages', 'page_id IN (' . implode(',', $pid) . ')');
        $GLOBALS['TYPO3_DB']->exec_DELETEquery('cache_pagesection', 'page_id IN (' . implode(',', $pid) .')');
    } else {
        $addWhere = $cHash ? ' and cHash = "' . $cHash . '"' : '';
        $GLOBALS['TYPO3_DB']->exec_DELETEquery('cache_pages', 'page_id = ' . $pid . $addWhere);
        $GLOBALS['TYPO3_DB']->exec_DELETEquery('cache_pagesection', 'page_id = ' . $pid . $addWhere);
    }
}  

And how i can validation cHash from url in browser in new version typo3 (4.7.5-12)?


Thankyou...




More information about the TYPO3-dev mailing list