Dieser Teil gehört in die additional.php um mit dem redis verbunden zusein.
<?php
/**
* #ddev-generated: Automatically generated TYPO3 AdditionalConfiguration.php file.
* ddev manages this file and may delete or overwrite the file unless this comment is removed.
* It is recommended that you leave this file alone.
*/
$redisHost = 'bootstrappackage12.ddev.site'; #den jeweiligen host eintragen
$redisPort = 6379;
$cachesForRedis = [
'pages' => 86400*30,
'pagesection' => 86400*30,
'hash' => 86400*30,
'rootline' => 86400*30,
];
$redisDatabaseNumber = 3;
foreach ($cachesForRedis as $cacheName => $lifetime) {
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'][$cacheName]['backend'] = \TYPO3\CMS\Core\Cache\Backend\RedisBackend::class;
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'][$cacheName]['options'] = [
'database' => $redisDatabaseNumber++,
'hostname' => $redisHost,
'port' => $redisPort,
'defaultLifetime' => $lifetime
];
}
Die settings.php habe ich auch etwas an meine Bedürfnisse für das caching angepasst:
'SYS' => [
'caching' => [
'cacheConfigurations' => [
'assets' => [
'backend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\FileBackend',
],
'core' => [
'backend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\FileBackend',
],
'extbase' => [
'backend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\FileBackend',
],
'fluid_template' => [
'backend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\FileBackend',
],
'hash' => [
'backend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\FileBackend',
],
'imagesizes' => [
'backend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\SimpleFileBackend',
],
'l10n' => [
'backend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\FileBackend',
],
'pages' => [
'backend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\Typo3DatabaseBackend',
],
'phpcode' => [
'backend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\FileBackend',
],
'ratelimiter' => [
'backend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\FileBackend',
],
'rootline' => [
'backend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\FileBackend',
],
'runtime' => [
'backend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\TransientMemoryBackend',
],
],
],
],
Wenn Euch das Thema interessiert hier die TYPO3 Lektüre zu caching und redis: