Following qick'n'dirty hack (caching is definitly too complex for me, so please review very intensely) seems to work with a minimal FluidTYPO3 (TYPO3 6.2, flux, fluidpages and fluidcontent). I had to add some conditions (extbase_datamapfactory_datamap
, extbase_typo3dbbackend_tablecolumns
and fluid_template
) to get rid of exeptions a la
if (isset($GLOBALS['typo3CacheManager']) === TRUE) {
if (version_compare(TYPO3_branch, '6.2', '<')) {
$configurations = \TYPO3\CMS\Extbase\Reflection\ObjectAccess::getProperty($GLOBALS['typo3CacheManager'], 'cacheConfigurations', TRUE);
$caches = \TYPO3\CMS\Extbase\Reflection\ObjectAccess::getProperty($GLOBALS['typo3CacheManager'], 'caches', TRUE);
$GLOBALS['typo3CacheManager'] = new \TYPO3\CMS\Uncache\Override\Core\Cache\CacheManager();
$GLOBALS['typo3CacheManager']->setCacheConfigurations($configurations);
\TYPO3\CMS\Extbase\Reflection\ObjectAccess::setProperty($GLOBALS['typo3CacheManager'], 'caches', $caches, TRUE);
\TYPO3\CMS\Core\Utility\GeneralUtility::setSingletonInstance('TYPO3\\CMS\\Core\\Cache\\CacheManager', $GLOBALS['typo3CacheManager']);
unset($configurations, $caches);
} else {
$typo3CacheManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\CMS\Core\Cache\CacheManager');
$configurations = \TYPO3\CMS\Extbase\Reflection\ObjectAccess::getProperty($typo3CacheManager, 'cacheConfigurations', TRUE);
if (!isset($configurations['extbase_datamapfactory_datamap'])) {
$configurations['extbase_datamapfactory_datamap'] = \TYPO3\CMS\Extbase\Reflection\ObjectAccess::getProperty($typo3CacheManager, 'defaultCacheConfiguration', TRUE);
}
if (!isset($configurations['extbase_typo3dbbackend_tablecolumns'])) {
$configurations['extbase_typo3dbbackend_tablecolumns'] = \TYPO3\CMS\Extbase\Reflection\ObjectAccess::getProperty($typo3CacheManager, 'defaultCacheConfiguration', TRUE);
}
if (!isset($configurations['fluid_template'])) {
$configurations['fluid_template'] = $configurations['cache_core'];
}
$caches = \TYPO3\CMS\Extbase\Reflection\ObjectAccess::getProperty($typo3CacheManager, 'caches', TRUE);
$typo3CacheManager = new \TYPO3\CMS\Uncache\Override\Core\Cache\CacheManager();
$typo3CacheManager->setCacheConfigurations($configurations);
\TYPO3\CMS\Extbase\Reflection\ObjectAccess::setProperty($typo3CacheManager, 'caches', $caches, TRUE);
\TYPO3\CMS\Core\Utility\GeneralUtility::setSingletonInstance('TYPO3\\CMS\\Core\\Cache\\CacheManager', $typo3CacheManager);
unset($configurations, $caches);
}
}