Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $cacheBackend = 'TYPO3\\CMS\\Core\\Cache\\Backend\\RedisBackend';
- $caches = [
- 'cache_hash',
- 'cache_pages',
- 'cache_pagesection',
- 'cache_rootline',
- 'extbase_object',
- 'extbase_reflection'
- ];
- foreach ($caches as $key => $cache) {
- $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'][$cache]['backend'] = $cacheBackend;
- if ($cacheBackend === 'TYPO3\\CMS\\Core\\Cache\\Backend\\RedisBackend') {
- $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'][$cache]['options']['hostname'] = 'redis';
- $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'][$cache]['options']['port'] = 6379;
- $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'][$cache]['options']['database'] = $key + 2;
- }
- }
Add Comment
Please, Sign In to add comment