[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
Fri Oct 8 21:03:15 CEST 2010


Christian Kuhn schrieb am 08.10.2010 19:59:

> On 10/08/2010 04:36 PM, Christian Kuhn wrote:
>> Problem:
>> With issue #15389 we un-hardcoded the cache frontends for core caches.
>> This now leads to an error if own core caches are defined and the
>> frontend setting is missing. t3lib_div::makeInstance will then get null
>> as frontend class and just spits error "Class not found", without more
>> infromation on what exactly went wrong. This makes this issue hard to
>> track down.
>>
>> Solution:
>> Throw a more meaningful error message in t3lib_cache if frontend
>> definition is missing for core caches.
> 
> Seems that even some extensions do not come with proper frontend
> definitions, see for instance http://bugs.typo3.org/view.php?id=15940
> 
> Thus, I've moved the exception from core cache handling to the cache
> factory. This will now catch all frontends which have not been defined
> in $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheFrontends'].

I suspect your #15940 issue for tt_news is not really valid.
tx_ttnews_cache::initCachingFramework() does the following:

	$GLOBALS['typo3CacheFactory']->create(
		'tt_news_cache',
		't3lib_cache_frontend_StringFrontend',
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['tt_news_cache']['backend'],

$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['tt_news_cache']['options']
	);

So the StringFrontend is hardcoded, for probably the same reasons as we
had cache_pages etc also hardcoded in the core before: The extension
author has to decide which frontend is required for his specific
application, because he knows which kind of data he wants to store in
it. It (still) makes no sense to have that configurable (in my opinion).

So I guess your exception in the factory is still ok and +1 by reading,
but it doesn't probably affect the tt_news extension, as you mentioned it.

Cheers,
Ernesto


More information about the TYPO3-team-core mailing list