Enable Memcached in Typo3 6.x

After the upgrade of Typo3 from version 4.7.x to 6.x a lot of things changed. I managed to make the transition quite smoothly but the memcache configuration gave me quite a headache because nothing was directly explained in the net – I had to pick through a lot of pieces to make it work, so maybe I can spare You the time.

To enable Memcached in Typo3 6.x for backend and frontend pages create a File named AdditionalConfiguration.php in the the folder typo3conf with the following content:

<?php
$GLOBALS['TYPO3_CONF_VARS']['SYS']['useCachingFramework'] = '1';
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_pages']['backend'] = 'TYPO3\CMS\Core\Cache\Backend\MemcachedBackend';
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_pages']['options'] = array('servers' => array('localhost:11211'),);
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_pagesection']['backend'] = 'TYPO3\CMS\Core\Cache\Backend\MemcachedBackend';
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_pagesection']['options'] = array('servers' => array('localhost:11211'),);
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_hash']['backend'] = 'TYPO3\CMS\Core\Cache\Backend\MemcachedBackend';
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_hash']['options'] = array('servers' => array('localhost:11211'),);
?>

Obviously change the memcached server address and port if needed.