[TYPO3-dev] scheduler_task should clear cache for one page

Bernd Wilke t3ng at pi-phi.tk
Fri Aug 26 12:51:09 CEST 2011


On 08/26/2011 12:25 PM, Xavier Perseguers wrote:
> Hi,
>
> Christian Kuhn wrote:
>> On 08/26/2011 10:05 AM, Bernd Wilke wrote:
>>> I have written a scheduler-task to import data.
>>> this is working, but the FE-display of the data is cached and after an
>>> data-update the cached page still is shown with old data.
>>>
>>> how can I clear cache of a page?
>>
>> If caching framework is enabled:
>> cacheManager->getCache('cache_pages')->flushByTag('PageId_4711');
>
> And w/o caching framework, in 4.5, have a look at how Extbase managed to
> do it from FE (search for TCEMAIN.clearCacheCmd)
>
> HTH
>
ouch =:-O but it works (without using caching framework)

if (TYPO3_UseCachingFramework) {
:
} else[...] {
	$GLOBALS['TYPO3_DB']->exec_DELETEquery( 'cache_pages', 'page_id IN (' . 
implode(',', $GLOBALS['TYPO3_DB']->cleanIntArray($pageIds)) . ')'
			);
}



bernd
-- 
http://www.pi-phi.de/cheatsheet.html




More information about the TYPO3-dev mailing list