private function getNews($hostname)
{
// Cached for two hours.
$news = $this->app['cache']->fetch('dashboardnews');
if ($news !== false) {
$this->app['logger.system']->info('Using cached data', ['event' => 'news']);
return $news;
}
// If not cached, get fresh news.
$news = $this->fetchNews($hostname);
$this->app['cache']->save('dashboardnews', $news, 7200);
return $news;
}