Guest User

Untitled

a guest
Jun 25th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. <?php
  2. $cacheBackend = 'TYPO3\\CMS\\Core\\Cache\\Backend\\RedisBackend';
  3.  
  4. $caches = [
  5. 'cache_hash',
  6. 'cache_pages',
  7. 'cache_pagesection',
  8. 'cache_rootline',
  9. 'extbase_object',
  10. 'extbase_reflection'
  11. ];
  12.  
  13. foreach ($caches as $key => $cache) {
  14. $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'][$cache]['backend'] = $cacheBackend;
  15. if ($cacheBackend === 'TYPO3\\CMS\\Core\\Cache\\Backend\\RedisBackend') {
  16. $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'][$cache]['options']['hostname'] = 'redis';
  17. $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'][$cache]['options']['port'] = 6379;
  18. $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'][$cache]['options']['database'] = $key + 2;
  19. }
  20. }
Add Comment
Please, Sign In to add comment