From 153d3fe0b82440d026212d5484bcc7433f116bd1 Mon Sep 17 00:00:00 2001 From: Martijn de Boer Date: Fri, 22 Mar 2024 18:55:39 +0100 Subject: [PATCH] Fixes --- lib/Cache.php | 13 +++++++++++++ lib/Template.php | 7 ++++++- 2 files changed, 19 insertions(+), 1 deletion(-) 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