/**
* Render a template, possibly store it in cache. Or, if applicable, return the cached result.
*
* @param string $template the template name
* @param array $vars array of context variables
* @param array $globals array of global variables
*
* @return mixed
*/
public function render($template, $vars = array(), $globals = array())
{
// Start the 'stopwatch' for the profiler.
$this->app['stopwatch']->start('bolt.render', 'template');
$response = BoltResponse::create($this->app[$this->twigKey]->loadTemplate($template), $vars, $globals);
// Stop the 'stopwatch' for the profiler.
$this->app['stopwatch']->stop('bolt.render');
return $response;
}