[TYPO3-dev] Seperate (clearable) cache for frontend plugins

Steffen Kamper info at sk-typo3.de
Sun Nov 15 22:15:32 CET 2009


Hi,

Peter Klein schrieb:
> Hi Thomas.
> 
> you can manually clear the cache for the pages where your plugin is 
> inserted, whenever a user have updated data, like this (which is exactly the 
> same thing that happens when you clears the pagecache from the BE):
> 
> $GLOBALS['TYPO3_DB']->exec_DELETEquery('cache_pages','page_id IN 
> ('.implode(',',$GLOBALS['TYPO3_DB']->cleanIntArray($list_cache)).')');
> $GLOBALS['TYPO3_DB']->exec_DELETEquery('cache_pagesection', 'page_id IN 
> ('.implode(',',$GLOBALS['TYPO3_DB']->cleanIntArray($list_cache)).')');
> 
> var $list_cache is an array of page ids.
> 

this isn't valid for 4.3+ where cache_framework is in use. If you use 
filecache / memcache / APC etc this won't work any longer. So the cache 
API should be used.
And there you can make usage of the tags for delete specific cache.

vg Steffen




More information about the TYPO3-dev mailing list