[TYPO3-dev] enetcache - clear all caches

Christian Kuhn lolli at schwarzbu.ch
Wed Nov 16 17:43:13 CET 2011


Hey Krystian,

On 11/16/2011 11:38 AM, Krystian Szymukowicz wrote:
> I'd like to have some type of entries in the cache not to be flushed
> when "clear all caches" is hit by admin.
>
> I go through the docs but there is nothing like this possible.
>
> Should I create my own caching tables and not use enetcache in this case ?

In TYPO3 4.5 and below enetcache hooks into 'clear all cache' core 
handling to clear its contentcache tables if clicking 'clear all cache'.

This is registered in ext_localconf:
	// Clear our cache table on "Clear all cache" click and 
"TCEMAIN.clearCacheCmd = all"
	// Done by core automatically since 4.6
if (t3lib_div::int_from_ver(TYPO3_version) <= '4005999') {
	$TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc'][] = 'EXT:enetcache/hooks/class.tx_enetcache_backendContentCacheMethods.php:tx_enetcache_backendContentCacheMethods->clearCachePostProc';
}

If you uncomment this, your content element caches of enetcache will not 
be cleared on 'clear all cache' (but can still be cleared with click on 
enetcache's entry "Delete plugin cache").

It should also be possible to xclass 
tx_enetcache_backendContentCacheMethods method clearCachePostProc in 
order to implement own drop logic.


With TYPO3 4.6 the core clears _all_ caching framework caches are 
cleared on 'clear all caches' anyway and there is currently no way to 
exclude certain caches. I think there was a need for l10n cache in this 
direction as well but it was not solved for 4.6, iirc I even blocked the 
according issue for reasons I cannot recall currently.


Regards
Christian



More information about the TYPO3-dev mailing list