/**
* Warms up the cache.
*
* @param string $cacheDir The cache directory
*/
public function warmUp($cacheDir)
{
$locator = $this->locator->getLocator();
$allTemplates = $this->finder->findAllTemplates();
$templates = [];
foreach ($allTemplates as $template) {
$this->locateTemplate($locator, $template, $templates);
}
$this->writeCacheFile($cacheDir . '/templates.php', sprintf('<?php return %s;', var_export($templates, true)));
}