function DevelController::cacheClear
Same name in other branches
- 8.x-1.x src/Controller/DevelController.php \Drupal\devel\Controller\DevelController::cacheClear()
- 5.x src/Controller/DevelController.php \Drupal\devel\Controller\DevelController::cacheClear()
Clears all caches, then redirects to the previous page.
1 string reference to 'DevelController::cacheClear'
File
-
src/
Controller/ DevelController.php, line 94
Class
- DevelController
- Returns responses for devel module routes.
Namespace
Drupal\devel\ControllerCode
public function cacheClear() {
drupal_flush_all_caches();
$this->messenger()
->addMessage($this->t('Cache cleared.'));
return $this->redirect('<front>');
}