diff --git a/lib/Cache.php b/lib/Cache.php index 132fec4..60ae734 100644 --- a/lib/Cache.php +++ b/lib/Cache.php @@ -1,7 +1,20 @@ class) ? new $options->class($this, $options) : new EmptyTemplate($this, $options); $class->load(); - $contents = file_get_contents(TEMPLATE_DIR . "/" . $this->template); + + $contents = Cache::getTemplateFromCache($this->template); + if (is_null($contents)) { + $contents = file_get_contents(TEMPLATE_DIR . "/" . $this->template); + Cache::setTemplateToCache($this->template, $contents); + } $class->pretransform(); // Replace includes of templates