private function getData($startDate, $endDate)
{
$dateRange = $startDate . '-' . $endDate;
$item = $this->cache->getItem('analytics-' . $dateRange);
if ($item->isHit()) {
return $item->get();
}
$data = array('metrics' => $this->getMetrics($startDate, $endDate), 'visitGraphData' => $this->collectVisitGraphData($startDate, $endDate), 'pageViews' => $this->collectMostVisitedPagesData($startDate, $endDate), 'sourceGraphData' => $this->collectSourceGraphData($startDate, $endDate));
$item->set($data);
$this->cache->save($item);
return $data;
}