src/Webiny/Hrc/Hrc.php
private function canPurge()
    {
        // check if purge header exists
        if (!$this->request->matchHeader(self::H_PURGE)) {
            return false;
        }

        if ($this->controlKey == '') {
            return true; // everybody can purge
        }

        // only users with valid control key can purge
        if ($this->request->matchHeader(self::H_CKEY, $this->controlKey)) {
            return true;
        }

        return false;
    }
private function canPurge()
    {
        // check if purge header exists
        if (!$this->request->matchHeader(self::H_PURGE)) {
            return false;
        }

        if ($this->controlKey == '') {
            return true; // everybody can purge
        }

        // only users with valid control key can purge
        if ($this->request->matchHeader(self::H_CKEY, $this->controlKey)) {
            return true;
        }

        return false;
    }
private function canPurge ( ) { // check if purge header exists if ( ! $ this -> request -> matchHeader ( self :: H_PURGE ) ) { return false ; } if ( $ this -> controlKey == '' ) { return true ; // everybody can purge } // only users with valid control key can purge if ( $ this -> request -> matchHeader ( self :: H_CKEY , $ this -> controlKey ) ) { return true ; } return false ; }
Checks if user can purge the cache by validating the control key and purge flag inside the request headers.

@return bool
Checks if user can purge the cache by validating the control key and purge flag inside the request headers .