[TYPO3] clear cache from cron script

Dmitry Dulepov dmitry at typo3.org
Wed Jul 18 09:24:40 CEST 2007


Loek Hilgersom wrote:
> I need to run a cron job which will update data for an extension in 
> Typo3. After updating the data I need to clear the FE-cache for that 
> specific page. How do I do that properly?
> 
> Is it a matter of just emptying some records in cache_pages
> (DELETE FROM cache_pages WHERE id=x)

No. This will not clear cache properly, it will leave data in other 
tables and sometimes in file system.

> or is there a more appropriate way to achieve this?

You need to look to t3lib/class.t3lib_tcemain.php and its clear_cacheCmd 
function. Also search for "makeInstance('t3lib_TCEmain') to see how to 
instantiate tcemain properly.

-- 
Dmitry Dulepov
TYPO3 freelancer / TYPO3 core team member
Web: http://typo3bloke.net/
Skype: callto:liels_bugs


More information about the TYPO3-english mailing list