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');
- $clearCacheService->clearAll();
- }
- }
I didn’t find out yet how to delete just one certain cache, i.e. only the Frontend Cache.