[Typo3-dev] Clear Cache

Lars Houmark lars at houmark.com
Sat Apr 2 11:53:04 CEST 2005


I've looked more into it. It seems there is no special API call or something 
like it, so for the time being I've added:

$GLOBALS['TYPO3_DB']->exec_DELETEquery('cache_pages', 'page_id IN (1,2)');

This is the same way as the function clear_cacheCmd in tcemain.php. I am not 
sure this is the smartest way, so if anyone has a better way or a best 
pratice, please let me know.

By the way, would I need to clear the pagesection as well, to make sure it's 
all cleared or will the pagesections regenerate automaticly when the page is 
regenerated?

Thanks,

Lars Houmark

"Lars Houmark" <lars at houmark.com> wrote in message 
news:mailman.1.1112429759.13925.typo3-dev at lists.netfielders.de...
> Hi list,
>
> For an extension I am working on, I have made a "mod" script, with a form, 
> which updates some mysql data. After saving the data in the form I need to 
> clear the cache on some pages, as another extension uses these data, and 
> the pages generated with that plugin is cached.
>
> Can anybody point me in the direction on how to clear some or all pages in 
> the cache, directly from the "mod" index.php script?
>
> Regards,
>
> Lars Houmark
> 






More information about the TYPO3-dev mailing list