Project

General

Profile

Bug #20133 » cache_update.diff

Administrator Admin, 2009-03-08 12:37

View differences:

t3lib/class.t3lib_cache.php (working copy)
try {
$GLOBALS['typo3CacheFactory']->create(
'cache_pages',
't3lib_cache_VariableCache',
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheBackendAssignments']['cache_pages']['backend'],
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheBackendAssignments']['cache_pages']['options']
't3lib_cache_frontend_VariableFrontend',
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_pages']['backend'],
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_pages']['options']
);
} catch(t3lib_cache_exception_DuplicateIdentifier $e) {
// do nothing, a cache_pages cache already exists
......
try {
$GLOBALS['typo3CacheFactory']->create(
'cache_pagesection',
't3lib_cache_VariableCache',
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheBackendAssignments']['cache_pagesection']['backend'],
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheBackendAssignments']['cache_pagesection']['options']
't3lib_cache_frontend_VariableFrontend',
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_pagesection']['backend'],
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_pagesection']['options']
);
} catch(t3lib_cache_exception_DuplicateIdentifier $e) {
// do nothing, a cache_pagesection cache already exists
......
try {
$GLOBALS['typo3CacheFactory']->create(
'cache_hash',
't3lib_cache_VariableCache',
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheBackendAssignments']['cache_hash']['backend'],
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheBackendAssignments']['cache_hash']['options']
't3lib_cache_frontend_VariableFrontend',
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_hash']['backend'],
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_hash']['options']
);
} catch(t3lib_cache_exception_DuplicateIdentifier $e) {
// do nothing, a cache_hash cache already exists
t3lib/config_default.php (working copy)
'reverseProxySSL' => '', // String: '*' or list of IP addresses of proxies that use SSL (https) for the connection to the client, but an unencrypted connection (http) to the server. If '*' all proxies defined in SYS[reverseProxyIP] use SSL.
'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(
'defaultFrontend' => 't3lib_cache_frontend_VariableFrontend',
'defaultBackend' => 't3lib_cache_backend_FileBackend',
'cacheFrontends' => array(
't3lib_cache_VariableCache' => 't3lib/cache/class.t3lib_cache_variablecache.php:t3lib_cache_VariableCache'
'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'
),
'cacheBackends' => array(
't3lib_cache_backend_Db' => 't3lib/cache/backend/class.t3lib_cache_backend_db.php:t3lib_cache_backend_Db',
't3lib_cache_backend_File' => 't3lib/cache/backend/class.t3lib_cache_backend_file.php:t3lib_cache_backend_File',
't3lib_cache_backend_Globals' => 't3lib/cache/backend/class.t3lib_cache_backend_globals.php:t3lib_cache_backend_Globals',
't3lib_cache_backend_Memcached' => 't3lib/cache/backend/class.t3lib_cache_backend_memcached.php:t3lib_cache_backend_Memcached',
't3lib_cache_backend_Null' => 't3lib/cache/backend/class.t3lib_cache_backend_null.php:t3lib_cache_backend_Null'
'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_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'
),
'cacheBackendAssignments' => array(
'cacheConfigurations' => array(
'cache_hash' => array(
'backend' => 't3lib_cache_backend_Db',
'backend' => 't3lib_cache_backend_DbBackend',
'options' => array(
'cacheTable' => 'cache_hash'
)
),
'cache_pages' => array(
'backend' => 't3lib_cache_backend_Db',
'backend' => 't3lib_cache_backend_DbBackend',
'options' => array(
'cacheTable' => 'cache_pages'
)
),
'cache_pagesection' => array(
'backend' => 't3lib_cache_backend_Db',
'backend' => 't3lib_cache_backend_DbBackend',
'options' => array(
'cacheTable' => 'cache_pagesection'
)
......
For memcached, use:
=============
'cache_pages' => array(
'backend' => 't3lib_cache_backend_Memcached',
'backend' => 't3lib_cache_backend_MemcachedBackend',
'options' => array(
'servers' => array('localhost:11211', 'otherhost:11211', 'thirdhost:11211'), // port is mandatory!
)
typo3/init.php (working copy)
// TODO implement autoloading so that we only require stuff we really need
require_once(PATH_t3lib . 'class.t3lib_cache.php');
require_once(PATH_t3lib . 'cache/class.t3lib_cache_abstractbackend.php');
require_once(PATH_t3lib . 'cache/class.t3lib_cache_abstractcache.php');
require_once(PATH_t3lib . 'cache/backend/interfaces/interface.t3lib_cache_backend_backend.php');
require_once(PATH_t3lib . 'cache/frontend/interfaces/interface.t3lib_cache_frontend_frontend.php');
require_once(PATH_t3lib . 'cache/backend/class.t3lib_cache_backend_abstractbackend.php');
require_once(PATH_t3lib . 'cache/frontend/class.t3lib_cache_frontend_abstractfrontend.php');
require_once(PATH_t3lib . 'cache/class.t3lib_cache_exception.php');
require_once(PATH_t3lib . 'cache/class.t3lib_cache_factory.php');
require_once(PATH_t3lib . 'cache/class.t3lib_cache_manager.php');
require_once(PATH_t3lib . 'cache/class.t3lib_cache_variablecache.php');
require_once(PATH_t3lib . 'cache/frontend/class.t3lib_cache_frontend_variablefrontend.php');
require_once(PATH_t3lib . 'cache/exception/class.t3lib_cache_exception_classalreadyloaded.php');
require_once(PATH_t3lib . 'cache/exception/class.t3lib_cache_exception_duplicateidentifier.php');
......
require_once(PATH_t3lib . 'cache/exception/class.t3lib_cache_exception_nosuchcache.php');
$typo3CacheManager = t3lib_div::makeInstance('t3lib_cache_Manager');
$typo3CacheFactory = t3lib_div::makeInstance('t3lib_cache_Factory', $typo3CacheManager);
$typo3CacheFactory = t3lib_div::makeInstance('t3lib_cache_Factory');
$typo3CacheFactory->setCacheManager($typo3CacheManager);
t3lib_cache::initPageCache();
t3lib_cache::initPageSectionCache();
......
} else {
die('Browser backend is locked for maintenance. Remove lock by removing the file "typo3conf/LOCK_BACKEND" or use CLI-scripts.'.chr(10).chr(10));
}
exit;
exit;
}
}
// **********************
typo3/sysext/cms/tslib/class.tslib_fe.php (working copy)
t3lib_div::requireOnce(PATH_t3lib . 'class.t3lib_cache.php');
t3lib_div::requireOnce(PATH_t3lib . 'cache/class.t3lib_cache_abstractbackend.php');
t3lib_div::requireOnce(PATH_t3lib . 'cache/class.t3lib_cache_abstractcache.php');
t3lib_div::requireOnce(PATH_t3lib . 'cache/backend/interfaces/interface.t3lib_cache_backend_backend.php');
t3lib_div::requireOnce(PATH_t3lib . 'cache/frontend/interfaces/interface.t3lib_cache_frontend_frontend.php');
t3lib_div::requireOnce(PATH_t3lib . 'cache/backend/class.t3lib_cache_backend_abstractbackend.php');
t3lib_div::requireOnce(PATH_t3lib . 'cache/frontend/class.t3lib_cache_frontend_abstractfrontend.php');
t3lib_div::requireOnce(PATH_t3lib . 'cache/class.t3lib_cache_exception.php');
t3lib_div::requireOnce(PATH_t3lib . 'cache/class.t3lib_cache_factory.php');
t3lib_div::requireOnce(PATH_t3lib . 'cache/class.t3lib_cache_manager.php');
t3lib_div::requireOnce(PATH_t3lib . 'cache/class.t3lib_cache_variablecache.php');
t3lib_div::requireOnce(PATH_t3lib . 'cache/frontend/class.t3lib_cache_frontend_variablefrontend.php');
t3lib_div::requireOnce(PATH_t3lib . 'cache/exception/class.t3lib_cache_exception_classalreadyloaded.php');
t3lib_div::requireOnce(PATH_t3lib . 'cache/exception/class.t3lib_cache_exception_duplicateidentifier.php');
......
$GLOBALS['TT']->push('Initializing the Caching System','');
$GLOBALS['typo3CacheManager'] = t3lib_div::makeInstance('t3lib_cache_Manager');
$GLOBALS['typo3CacheFactory'] = t3lib_div::makeInstance('t3lib_cache_Factory', $GLOBALS['typo3CacheManager']);
$GLOBALS['typo3CacheFactory'] = t3lib_div::makeInstance('t3lib_cache_Factory');
$GLOBALS['typo3CacheFactory']->setCacheManager($GLOBALS['typo3CacheManager']);
try {
$this->pageCache = $GLOBALS['typo3CacheManager']->getCache(
(4-4/5)