/** * Get schema SQL of required cache framework tables. * * This method needs ext_localconf and ext_tables loaded! * * @return string Cache framework SQL */ public function getCachingFrameworkRequiredDatabaseSchema() { // Use new to circumvent the singleton pattern of CacheManager $cacheManager = new CacheManager(); $cacheManager->setCacheConfigurations($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']); // Cache manager needs cache factory. cache factory injects itself to manager in __construct() new CacheFactory('production', $cacheManager); $tableDefinitions = ''; foreach ($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'] as $cacheName => $_) { $backend = $cacheManager->getCache($cacheName)->getBackend(); if (method_exists($backend, 'getTableDefinitions')) { $tableDefinitions .= LF . $backend->getTableDefinitions(); } } return $tableDefinitions; }