Controller/Adminhtml/FastlyCdn/Purge/All.php
public function execute()
    {
        // Flush all Magento caches
        $types = $this->cacheManager->getAvailableTypes();
        $types = array_diff($types, ['full_page']); // FPC is Handled separately

        $this->cacheManager->clean($types);

        // Purge everything from Fastly
        $result = $this->api->cleanAll();

        if ($result === true) {
            $this->messageManager->addSuccessMessage(
                __('Full Magento & Fastly Cache has been cleaned.')
            );
        } else {
            $this->getMessageManager()->addErrorMessage(
                __('Full Magento & Fastly Cache was not cleaned successfully.')
            );
        }

        return $this->_redirect('*/cache/index');
    }
public function execute()
    {
        // Flush all Magento caches
        $types = $this->cacheManager->getAvailableTypes();
        $types = array_diff($types, ['full_page']); // FPC is Handled separately

        $this->cacheManager->clean($types);

        // Purge everything from Fastly
        $result = $this->api->cleanAll();

        if ($result === true) {
            $this->messageManager->addSuccessMessage(
                __('Full Magento & Fastly Cache has been cleaned.')
            );
        } else {
            $this->getMessageManager()->addErrorMessage(
                __('Full Magento & Fastly Cache was not cleaned successfully.')
            );
        }

        return $this->_redirect('*/cache/index');
    }
public function execute ( ) { // Flush all Magento caches $ types = $ this -> cacheManager -> getAvailableTypes ( ) ; $ types = array_diff ( $ types , [ 'full_page' ] ) ; // FPC is Handled separately $ this -> cacheManager -> clean ( $ types ) ; // Purge everything from Fastly $ result = $ this -> api -> cleanAll ( ) ; if ( $ result === true ) { $ this -> messageManager -> addSuccessMessage ( __ ( 'Full Magento & Fastly Cache has been cleaned.' ) ) ; } else { $ this -> getMessageManager ( ) -> addErrorMessage ( __ ( 'Full Magento & Fastly Cache was not cleaned successfully.' ) ) ; } return $ this -> _redirect ( '*/cache/index' ) ; }
Performs cache cleanup and purge all on Fastly service.
Should be used when "Preserve static assets on purge" is enabled.

@return \Magento\Framework\App\ResponseInterface|\Magento\Framework\Controller\ResultInterface
@throws \Zend_Uri_Exception
Performs cache cleanup and purge all on Fastly service . Should be used when Preserve static assets on purge is enabled .