Index: tests/t3lib/cache/t3lib_cache_factoryTest.php =================================================================== --- tests/t3lib/cache/t3lib_cache_factoryTest.php (revision 8713) +++ tests/t3lib/cache/t3lib_cache_factoryTest.php (working copy) @@ -22,6 +22,8 @@ * This copyright notice MUST APPEAR in all copies of the script! ***************************************************************/ +require_once 'backend/class.t3lib_cache_backend_mockbackend.php'; + /** * Testcase for the Cache Factory * @@ -41,7 +43,7 @@ * @author Ingo Renner */ public function setUp() { - $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheBackends']['t3lib_cache_backend_MockBackend'] = 'tests/t3lib/cache/backend/class.t3lib_cache_backend_mockbackend.php:t3lib_cache_backend_MockBackend'; + $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheBackends']['t3lib_cache_backend_MockBackend'] = 't3lib_cache_backend_MockBackend'; } /** Index: t3lib/config_default.php =================================================================== --- t3lib/config_default.php (revision 8713) +++ t3lib/config_default.php (working copy) @@ -108,19 +108,19 @@ 'reverseProxyPrefixSSL' => '', // String: prefix to be added to the internal URL (SCRIPT_NAME and REQUEST_URI) when accessing the server via an SSL proxy. This setting overrides [SYS][reverseProxyPrefix]. 'caching' => array( 'cacheFrontends' => array( - 't3lib_cache_frontend_VariableFrontend' => 't3lib/cache/frontend/class.t3lib_cache_frontend_variablefrontend.php:t3lib_cache_frontend_VariableFrontend', - 't3lib_cache_frontend_StringFrontend' => 't3lib/cache/frontend/class.t3lib_cache_frontend_stringfrontend.php:t3lib_cache_frontend_StringFrontend', - 't3lib_cache_frontend_PhpFrontend' => 't3lib/cache/frontend/class.t3lib_cache_frontend_phpfrontend.php:t3lib_cache_frontend_PhpFrontend', + 't3lib_cache_frontend_VariableFrontend' => 't3lib_cache_frontend_VariableFrontend', + 't3lib_cache_frontend_StringFrontend' => 't3lib_cache_frontend_StringFrontend', + 't3lib_cache_frontend_PhpFrontend' => 't3lib_cache_frontend_PhpFrontend', ), 'cacheBackends' => array( - 't3lib_cache_backend_DbBackend' => 't3lib/cache/backend/class.t3lib_cache_backend_dbbackend.php:t3lib_cache_backend_DbBackend', - 't3lib_cache_backend_FileBackend' => 't3lib/cache/backend/class.t3lib_cache_backend_filebackend.php:t3lib_cache_backend_FileBackend', - 't3lib_cache_backend_GlobalsBackend' => 't3lib/cache/backend/class.t3lib_cache_backend_globalsbackend.php:t3lib_cache_backend_GlobalsBackend', - 't3lib_cache_backend_MemcachedBackend' => 't3lib/cache/backend/class.t3lib_cache_backend_memcachedbackend.php:t3lib_cache_backend_MemcachedBackend', - 't3lib_cache_backend_PdoBackend' => 't3lib/cache/backend/class.t3lib_cache_backend_pdobackend.php:t3lib_cache_backend_PdoBackend', - 't3lib_cache_backend_ApcBackend' => 't3lib/cache/backend/class.t3lib_cache_backend_apcbackend.php:t3lib_cache_backend_ApcBackend', - 't3lib_cache_backend_NullBackend' => 't3lib/cache/backend/class.t3lib_cache_backend_nullbackend.php:t3lib_cache_backend_NullBackend', - 't3lib_cache_backend_TransientMemoryBackend' => 't3lib/cache/backend/class.t3lib_cache_backend_transientmemorybackend.php:t3lib_cache_backend_TransientMemoryBackend', + 't3lib_cache_backend_DbBackend' => 't3lib_cache_backend_DbBackend', + 't3lib_cache_backend_FileBackend' => 't3lib_cache_backend_FileBackend', + 't3lib_cache_backend_GlobalsBackend' => 't3lib_cache_backend_GlobalsBackend', + 't3lib_cache_backend_MemcachedBackend' => 't3lib_cache_backend_MemcachedBackend', + 't3lib_cache_backend_PdoBackend' => 't3lib_cache_backend_PdoBackend', + 't3lib_cache_backend_ApcBackend' => 't3lib_cache_backend_ApcBackend', + 't3lib_cache_backend_NullBackend' => 't3lib_cache_backend_NullBackend', + 't3lib_cache_backend_TransientMemoryBackend' => 't3lib_cache_backend_TransientMemoryBackend', ), 'cacheConfigurations' => array( 'cache_hash' => array( Index: t3lib/cache/class.t3lib_cache_factory.php =================================================================== --- t3lib/cache/class.t3lib_cache_factory.php (revision 8713) +++ t3lib/cache/class.t3lib_cache_factory.php (working copy) @@ -71,15 +71,22 @@ */ public function create($cacheIdentifier, $cacheName, $backendName, array $backendOptions = array()) { - // loading the cache backend file and class - list($backendFile, $backendClassReference) = explode( - ':', - $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheBackends'][$backendName] - ); + $backendReference = $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheBackends'][$backendName]; + + if (strpos($backendReference, ':') === FALSE) { + $backendClassReference = $backendReference; + } else { + t3lib_div::deprecationLog("Configuring cacheBackend with filename is deprecated since TYPO3 4.5. Use the autoloader instead."); + // loading the cache backend file and class + list($backendFile, $backendClassReference) = explode( + ':', + $backendReference + ); - $backendRequireFile = t3lib_div::getFileAbsFileName($backendFile); - if ($backendRequireFile) { - t3lib_div::requireOnce($backendRequireFile); + $backendRequireFile = t3lib_div::getFileAbsFileName($backendFile); + if ($backendRequireFile) { + t3lib_div::requireOnce($backendRequireFile); + } } $backend = t3lib_div::makeInstance($backendClassReference, $backendOptions); @@ -91,17 +98,23 @@ ); } - // loading the cache frontend file and class - list($cacheFile, $cacheClassReference) = explode( - ':', - $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheFrontends'][$cacheName] - ); + $cacheReference = $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheFrontends'][$cacheName]; - $cacheRequireFile = t3lib_div::getFileAbsFileName($cacheFile); - if ($cacheRequireFile) { - t3lib_div::requireOnce($cacheRequireFile); - } + if (strpos($cacheReference, ':') === FALSE) { + $cacheClassReference = $cacheReference; + } else { + t3lib_div::deprecationLog("Configuring cacheFrontends with filename is deprecated since TYPO3 4.5. Use the autoloader instead."); + // loading the cache frontend file and class + list($cacheFile, $cacheClassReference) = explode( + ':', + $cacheReference + ); + $cacheRequireFile = t3lib_div::getFileAbsFileName($cacheFile); + if ($cacheRequireFile) { + t3lib_div::requireOnce($cacheRequireFile); + } + } $cache = t3lib_div::makeInstance($cacheClassReference, $cacheIdentifier, $backend);