public static function initRuntime(Latte\Runtime\Template $template)
{
if (!empty($template->global->cacheStack)) {
$file = (new \ReflectionClass($template))->getFileName();
if (@is_file($file)) {
// @ - may trigger error
end($template->global->cacheStack)->dependencies[Cache::FILES][] = $file;
}
}
}