Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Using different caching backend in TYPO3 6.x After #t3cs2013 I simply wanted to test the ad-hoc performance of using redis as a cache backend. The following lines simply demonstrate-this doesn't mean, it makes sense to use this particular cache backend. The example below uses only the Redis Backend and Namespaces.
<?php
/**
* We have to increse the database name. You could also have a meaningful name,
* but it has to be unique, so the caches do not interfere.
**/
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_pages']['backend'] = 'TYPO3\\CMS\\Core\\Cache\\Backend\\RedisBackend';
/**
* Options as per http://docs.typo3.org/typo3cms/CoreApiReference/CachingFramework/FrontendsBackends/Index.html#caching-backend-redis
**/
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_pages']['options'] = array(
'database' => 3,
);
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_runtime']['backend'] = 'TYPO3\\CMS\\Core\\Cache\\Backend\\RedisBackend';
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_runtime']['options'] = array(
'database' => 4,
);
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cash_hash']['backend'] = 'TYPO3\\CMS\\Core\\Cache\\Backend\\RedisBackend';
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cash_hash']['options'] = array(
'database' => 5,
);
/**
* Don't try this at home!
*/
//$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_core']['backend'] = 'TYPO3\\CMS\\Core\\Cache\\Backend\\RedisBackend';
//$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_core']['options'] = array(
// 'database' => 5,
//);
@tmotyl

This comment has been minimized.

Copy link

@tmotyl tmotyl commented Jul 18, 2017

this configuration is suboptimal, as it resets defaultLifetime key which was set in the DefaultConfiguration.php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment