code: public function sendPurgeRequest($pattern = '')
      {
          if (empty($pattern)) {
              if ($this->config->canPreserveStatic()) {
                  $result = $this->api->cleanBySurrogateKey(['text']);
              } else {
                  $result = $this->api->cleanAll();
              }
          } elseif (!is_array($pattern) && strpos($pattern, 'http') === 0) {
              $result = $this->api->cleanUrl($pattern);
          } elseif (is_array($pattern)) {
              $result = $this->api->cleanBySurrogateKey($pattern);
          } else {
              return false;
          }
          return $result;
      }
docs: Send API purge request to invalidate cache by pattern
  
  @param string $pattern
  @return bool
  @throws \Zend_Uri_Exception