[TYPO3-dev] Cleaning up specific cached pages

Steffen Kamper steffen at sk-typo3.de
Mon Aug 27 22:01:54 CEST 2007


"John de Stigter" <John.de.Stigter at bedrijvenweb.nl> schrieb im Newsbeitrag 
news:mailman.1900.1188218826.17142.typo3-dev at lists.netfielders.de...
Hi,

Say I'd have a frontend form visitors could use edit existing newsitems
of the tt_news table. What would be the best way to automatically clear
the cache for the page running singleview and displaying that newsitem
without deleting the cache of the other newitems?

Are there any functions or hooks for this? Would I for instance be able
to clear specific cached pages with the cHash key?

Cheerios,
John

Hi,

there is a nice trick if you want to clean the cache of the pages belonging 
to your ext.
Once set this:
$GLOBALS['TSFE']->page_cache_reg1 = 145; //145 is any number you want, 
beware of duplicate

then you can perform this to clear specific cache:
$GLOBALS['TYPO3_DB']->exec_DELETEquery('cache_pages', 'reg1=145');

vg  Steffen 






More information about the TYPO3-dev mailing list