public function RebuildCacheAccessController::rebuildCache in Rebuild Cache Access 8
Rebuild all caches, then redirects to the previous page.
1 string reference to 'RebuildCacheAccessController::rebuildCache'
File
- src/
Controller/ RebuildCacheAccessController.php, line 54
Class
- RebuildCacheAccessController
- Returns responses for rebuild_cache_access module routes.
Namespace
Drupal\rebuild_cache_access\ControllerCode
public function rebuildCache() {
drupal_flush_all_caches();
$this
->messenger()
->addMessage($this
->t('All caches cleared.'));
return new RedirectResponse($this
->reloadPage());
}