how to cache render output using micro mvc and custom template engine

Hi,

so i'm using the micro mvc and a custom template adapter for https://github.com/nette/latte

i can render my templates just fine


public function actionDefault()
{
  $this->view->render('homepage', 'default', []);
}

now i would like to cache the output. so I have tried this approach to get the rendered output


public function actionDefault()
{
  $this->view->start();
  $this->view->render('homepage', 'default', []);
  $this->view->finish();
  echo $this->view->getContent();
}

but getContent() returns null.

what else can I try to be able to cache the output?