Move the "flush data" logic into the Contao bundle