47 $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
48 $connection = $connectionPool->getConnectionByName(
'Default');
49 $tableNames = $connection->getSchemaManager()->listTableNames();
50 foreach ($tableNames as $tableName) {
51 if (strpos($tableName,
'cf_') === 0 || $tableName ===
'cache_treelist') {
52 $connection->truncate($tableName);
57 $remappedTables = isset(
$GLOBALS[
'TYPO3_CONF_VARS'][
'DB'][
'TableMapping'])
58 ? array_keys((array)
$GLOBALS[
'TYPO3_CONF_VARS'][
'DB'][
'TableMapping'])
60 foreach ($remappedTables as $tableName) {
61 if (strpos((
string)$tableName,
'cf_') === 0 || $tableName ===
'cache_treelist') {
62 $connectionPool->getConnectionForTable($tableName)->truncate($tableName);
80 $cacheManager = new \TYPO3\CMS\Core\Cache\CacheManager();
81 $cacheManager->setCacheConfigurations(
$GLOBALS[
'TYPO3_CONF_VARS'][
'SYS'][
'caching'][
'cacheConfigurations']);
82 $cacheManager->flushCaches();