addSqlData($this->getCachingFrameworkRequiredDatabaseSchema()); } /** * Get schema SQL of required cache framework tables. * * This method needs ext_localconf loaded! * * @return string Cache framework SQL */ private function getCachingFrameworkRequiredDatabaseSchema(): string { // Use new to circumvent the singleton pattern of CacheManager $cacheManager = new CacheManager(); $cacheManager->setCacheConfigurations($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']); $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; } }