public function cleanAll()
    {
        // Check if purge has been requested on this request
        if ($this->purged == true) {
            return true;
        }
        $this->purged = true;

        $type = 'clean/purge all';
        $uri = $this->_getApiServiceUri() . 'purge_all';
        $result = $this->_purge($uri, null);
        if ($result['status']) {
            $this->logger->execute('clean all items');
        }

        $canPublishPurgeAllChanges = $this->config->canPublishPurgeAllChanges();
        $canPublishPurgeChanges = $this->config->canPublishPurgeChanges();

        if ($this->config->areWebHooksEnabled() && ($canPublishPurgeAllChanges || $canPublishPurgeChanges)) {
            $this->sendWebHook('*initiated clean/purge all*');

            $canPublishPurgeAllDebugBacktrace = $this->config->canPublishPurgeAllDebugBacktrace();
            $canPublishPurgeDebugBacktrace = $this->config->canPublishPurgeDebugBacktrace();

            if ($canPublishPurgeAllDebugBacktrace == false && $canPublishPurgeDebugBacktrace == false) {
                return $result['status'];
            }

            $this->stackTrace($type);
        }

        return $result['status'];
    }
public function cleanAll()
    {
        // Check if purge has been requested on this request
        if ($this->purged == true) {
            return true;
        }
        $this->purged = true;

        $type = 'clean/purge all';
        $uri = $this->_getApiServiceUri() . 'purge_all';
        $result = $this->_purge($uri, null);
        if ($result['status']) {
            $this->logger->execute('clean all items');
        }

        $canPublishPurgeAllChanges = $this->config->canPublishPurgeAllChanges();
        $canPublishPurgeChanges = $this->config->canPublishPurgeChanges();

        if ($this->config->areWebHooksEnabled() && ($canPublishPurgeAllChanges || $canPublishPurgeChanges)) {
            $this->sendWebHook('*initiated clean/purge all*');

            $canPublishPurgeAllDebugBacktrace = $this->config->canPublishPurgeAllDebugBacktrace();
            $canPublishPurgeDebugBacktrace = $this->config->canPublishPurgeDebugBacktrace();

            if ($canPublishPurgeAllDebugBacktrace == false && $canPublishPurgeDebugBacktrace == false) {
                return $result['status'];
            }

            $this->stackTrace($type);
        }

        return $result['status'];
    }
public function cleanAll ( ) { // Check if purge has been requested on this request if ( $ this -> purged == true ) { return true ; } $ this -> purged = true ; $ type = 'clean/purge all' ; $ uri = $ this -> _getApiServiceUri ( ) . 'purge_all' ; $ result = $ this -> _purge ( $ uri , null ) ; if ( $ result [ 'status' ] ) { $ this -> logger -> execute ( 'clean all items' ) ; } $ canPublishPurgeAllChanges = $ this -> config -> canPublishPurgeAllChanges ( ) ; $ canPublishPurgeChanges = $ this -> config -> canPublishPurgeChanges ( ) ; if ( $ this -> config -> areWebHooksEnabled ( ) && ( $ canPublishPurgeAllChanges || $ canPublishPurgeChanges ) ) { $ this -> sendWebHook ( '*initiated clean/purge all*' ) ; $ canPublishPurgeAllDebugBacktrace = $ this -> config -> canPublishPurgeAllDebugBacktrace ( ) ; $ canPublishPurgeDebugBacktrace = $ this -> config -> canPublishPurgeDebugBacktrace ( ) ; if ( $ canPublishPurgeAllDebugBacktrace == false && $ canPublishPurgeDebugBacktrace == false ) { return $ result [ 'status' ] ; } $ this -> stackTrace ( $ type ) ; } return $ result [ 'status' ] ; }
Purge all of Fastly's CDN content. Can be called only once per request

@return bool|\Magento\Framework\Controller\Result\Json
@throws \Zend_Uri_Exception
Purge all of Fastly s CDN content . Can be called only once per request