diff --git a/src/AnalyticsReports.php b/src/AnalyticsReports.php index 703b93c..9b9425c 100644 --- a/src/AnalyticsReports.php +++ b/src/AnalyticsReports.php @@ -260,12 +260,14 @@ public function getSiteIdByUrl($url) */ public function performQuery($startDate, $endDate, $metrics, $others = array()) { - $cacheName = $this->determineCacheName(func_get_args()); + $startDate = $startDate->format('Y-m-d'); + $endDate = $endDate->format('Y-m-d'); + $cacheName = $this->determineCacheName(array($startDate, $endDate, $metrics, $others)); if ($this->useCache() AND Cache::has($cacheName)) { $answer = Cache::get($cacheName); } else { - $answer = $this->client->query($this->siteId, $startDate->format('Y-m-d'), $endDate->format('Y-m-d'), $metrics, $others); + $answer = $this->client->query($this->siteId, $startDate, $endDate, $metrics, $others); if ($this->useCache()) { Cache::put($cacheName, $answer, $this->cacheLifeTimeInMinutes); }