function Environment::isTemplateFresh
Returns true if the template is still fresh.
Besides checking the loader for freshness information, this method also checks if the enabled extensions have not changed.
Parameters
int $time The last modification time of the cached template:
1 call to Environment::isTemplateFresh()
- Environment::loadTemplate in vendor/
twig/ twig/ src/ Environment.php - Loads a template internal representation.
File
-
vendor/
twig/ twig/ src/ Environment.php, line 463
Class
- Environment
- Stores the Twig configuration and renders templates.
Namespace
TwigCode
public function isTemplateFresh(string $name, int $time) : bool {
return $this->extensionSet
->getLastModified() <= $time && $this->getLoader()
->isFresh($name, $time);
}