Feature #23473 ยป 15586.diff
tests/t3lib/cache/t3lib_cache_factoryTest.php (working copy) | ||
---|---|---|
* 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
|
||
*
|
||
... | ... | |
* @author Ingo Renner <ingo@typo3.org>
|
||
*/
|
||
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';
|
||
}
|
||
/**
|
t3lib/config_default.php (working copy) | ||
---|---|---|
'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 <a href="#SYS-reverseProxyPrefix">[SYS][reverseProxyPrefix]</a>.
|
||
'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(
|
t3lib/cache/class.t3lib_cache_factory.php (working copy) | ||
---|---|---|
*/
|
||
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);
|
||
... | ... | |
);
|
||
}
|
||
// 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);
|
||