Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
FlushAll.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Framework\App\Action\HttpGetActionInterface as HttpGetActionInterface;
10 
11 class FlushAll extends \Magento\Backend\Controller\Adminhtml\Cache implements HttpGetActionInterface
12 {
18  const ADMIN_RESOURCE = 'Magento_Backend::flush_cache_storage';
19 
25  public function execute()
26  {
27  $this->_eventManager->dispatch('adminhtml_cache_flush_all');
29  foreach ($this->_cacheFrontendPool as $cacheFrontend) {
30  $cacheFrontend->getBackend()->clean();
31  }
32  $this->messageManager->addSuccessMessage(__("You flushed the cache storage."));
34  $resultRedirect = $this->resultRedirectFactory->create();
35  return $resultRedirect->setPath('adminhtml/*');
36  }
37 }
__()
Definition: __.php:13