Checks if the compiled template needs an update.
public function needsUpdate($cache_filename, $name) {
$cid = 'twig:' . $cache_filename;
$obj = $this->cache_object
->get($cid);
$mtime = isset($obj->data) ? $obj->data : FALSE;
return $mtime !== FALSE && !$this
->isTemplateFresh($name, $mtime);
}