[TYPO3-core] RFC #15937: Bug: [Caching framework] Improve error message if no frontend was defined for core caches

Ernesto Baschny [cron IT] ernst at cron-it.de
Tue Oct 26 11:13:17 CEST 2010


Christian Kuhn schrieb am 11.10.2010 12:58:
> Hey,
> 
> On 10/11/2010 12:05 PM, Ernesto Baschny [cron IT] wrote:
>> The t3lib_cache_Manager has the definitive list of all caches and all
>> its setting, because every cache has to go through "factory::create()".
>> So why shouldn't the garbage collector be able to go through all of
>> them? It shouldn't rely on some external configuration, but it should be
>> a method / functionality of the cache_manager itself.
>>
>> If you think it shouldn't, then the cache manager should implement some
>> method to return an array of all caches so the GC can iterate over them.
> 
> Problem with the manager is: It knows the caches only if they where
> actually instantiated. Extbase for instance defines its cache in
> ext_localconf in typo3_conf_vars, but creates its cache object somewhere
> in its dispatcher, and the dispatcher is only called if some extbase
> functionality is called.
> Thats the reason why I choosed typo3_conf_vars to find all cache
> definition for the garbage collection task: It won't find all additional
> caches if we implement some "give me all defined caches" method in the
> cache manager because the for instance the extbase cache isn't
> necessarily instantiated at this point.

I understood the problem.

I would go the way of saying this is then a problem of extbase. The
caching framework API should specify that any caches should be
registered at "init" time (ext_localconf.php) so that everyone knows
about them and now only on "first usage".

Registering a cache early to the manager does not impose such a
performance penalty, does it?

Cheers,
Ernesto



More information about the TYPO3-team-core mailing list