public function performQuery($startDate, $endDate, $metrics, $others = [])
    {
        $startDate = $startDate->format('Y-m-d');
        $endDate = $endDate->format('Y-m-d');
        $cacheName = $this->determineCacheName([$startDate, $endDate, $metrics, $others]);

        if ($this->useCache() and Cache::has($cacheName)) {
            $answer = Cache::get($cacheName);
        } else {
            $answer = $this->client->query($this->siteId, $startDate, $endDate, $metrics, $others);
            if ($this->useCache()) {
                Cache::put($cacheName, $answer, $this->cacheLifeTimeInMinutes);
            }
        }

        return $answer;
    }
public function performQuery($startDate, $endDate, $metrics, $others = [])
    {
        $startDate = $startDate->format('Y-m-d');
        $endDate = $endDate->format('Y-m-d');
        $cacheName = $this->determineCacheName([$startDate, $endDate, $metrics, $others]);

        if ($this->useCache() and Cache::has($cacheName)) {
            $answer = Cache::get($cacheName);
        } else {
            $answer = $this->client->query($this->siteId, $startDate, $endDate, $metrics, $others);
            if ($this->useCache()) {
                Cache::put($cacheName, $answer, $this->cacheLifeTimeInMinutes);
            }
        }

        return $answer;
    }
public function performQuery ( $ startDate , $ endDate , $ metrics , $ others = [ ] ) { $ startDate = $ startDate -> format ( 'Y-m-d' ) ; $ endDate = $ endDate -> format ( 'Y-m-d' ) ; $ cacheName = $ this -> determineCacheName ( [ $ startDate , $ endDate , $ metrics , $ others ] ) ; if ( $ this -> useCache ( ) and Cache :: has ( $ cacheName ) ) { $ answer = Cache :: get ( $ cacheName ) ; } else { $ answer = $ this -> client -> query ( $ this -> siteId , $ startDate , $ endDate , $ metrics , $ others ) ; if ( $ this -> useCache ( ) ) { Cache :: put ( $ cacheName , $ answer , $ this -> cacheLifeTimeInMinutes ) ; } } return $ answer ; }
Call the query method on the autenthicated client.

@param \DateTime $startDate
@param \DateTime $endDate
@param $metrics
@param array     $others

@return mixed
Call the query method on the autenthicated client .