public function forceFlushDatabaseCacheTables()
    {
        // Get all table names from Default connection starting with 'cf_' and truncate them
        $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
        $connection = $connectionPool->getConnectionByName('Default');
        $tableNames = $connection->getSchemaManager()->listTableNames();
        foreach ($tableNames as $tableName) {
            if ($tableName === 'cache_treelist' || strpos($tableName, 'cf_') === 0) {
                $connection->truncate($tableName);
            }
        }
        // Check tables on other connections
        $remappedTables = isset($GLOBALS['TYPO3_CONF_VARS']['DB']['TableMapping'])
            ? array_keys((array)$GLOBALS['TYPO3_CONF_VARS']['DB']['TableMapping'])
            : [];
        foreach ($remappedTables as $tableName) {
            if ($tableName === 'cache_treelist' || strpos($tableName, 'cf_') === 0) {
                $connectionPool->getConnectionForTable($tableName)->truncate($tableName);
            }
        }
    }
public function forceFlushDatabaseCacheTables()
    {
        // Get all table names from Default connection starting with 'cf_' and truncate them
        $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
        $connection = $connectionPool->getConnectionByName('Default');
        $tableNames = $connection->getSchemaManager()->listTableNames();
        foreach ($tableNames as $tableName) {
            if ($tableName === 'cache_treelist' || strpos($tableName, 'cf_') === 0) {
                $connection->truncate($tableName);
            }
        }
        // Check tables on other connections
        $remappedTables = isset($GLOBALS['TYPO3_CONF_VARS']['DB']['TableMapping'])
            ? array_keys((array)$GLOBALS['TYPO3_CONF_VARS']['DB']['TableMapping'])
            : [];
        foreach ($remappedTables as $tableName) {
            if ($tableName === 'cache_treelist' || strpos($tableName, 'cf_') === 0) {
                $connectionPool->getConnectionForTable($tableName)->truncate($tableName);
            }
        }
    }
public function forceFlushDatabaseCacheTables ( ) { // Get all table names from Default connection starting with 'cf_' and truncate them $ connectionPool = GeneralUtility :: makeInstance ( ConnectionPool :: class ) ; $ connection = $ connectionPool -> getConnectionByName ( 'Default' ) ; $ tableNames = $ connection -> getSchemaManager ( ) -> listTableNames ( ) ; foreach ( $ tableNames as $ tableName ) { if ( $ tableName === 'cache_treelist' || strpos ( $ tableName , 'cf_' ) === 0 ) { $ connection -> truncate ( $ tableName ) ; } } // Check tables on other connections $ remappedTables = isset ( $ GLOBALS [ 'TYPO3_CONF_VARS' ] [ 'DB' ] [ 'TableMapping' ] ) ? array_keys ( ( array ) $ GLOBALS [ 'TYPO3_CONF_VARS' ] [ 'DB' ] [ 'TableMapping' ] ) : [ ] ; foreach ( $ remappedTables as $ tableName ) { if ( $ tableName === 'cache_treelist' || strpos ( $ tableName , 'cf_' ) === 0 ) { $ connectionPool -> getConnectionForTable ( $ tableName ) -> truncate ( $ tableName ) ; } } }
Truncate all DB tables prefixed with 'cf_'
Truncate all DB tables prefixed with cf_