Skip to content

Instantly share code, notes, and snippets.

@cedricziel
Created June 9, 2013 19:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save cedricziel/5744800 to your computer and use it in GitHub Desktop.
Save cedricziel/5744800 to your computer and use it in GitHub Desktop.
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
Copy link

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