Typo3: delete cache in extbase controller

The typo3 cache can be deleted in an extbase controller the following way:

use TYPO3\CMS\Extbase\Object\ObjectManager;

class Something {

    public function foo(){

      $objectManager = new ObjectManager();
      $clearCacheService = $objectManager->get('TYPO3\\CMS\\Install\\Service\\ClearCacheService');


I didn’t find out yet how to delete just one certain cache, i.e. only the Frontend Cache.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.