From 8af147c8d4fa9384b2959bd6aee30ca593cd0442 Mon Sep 17 00:00:00 2001
From: Jaime Perez Crespo <jaime.perez@uninett.no>
Date: Mon, 29 Feb 2016 16:11:48 +0100
Subject: [PATCH] Add a couple of configuration options to handle template
 caching.

---
 lib/SimpleSAML/XHTML/Template.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/SimpleSAML/XHTML/Template.php b/lib/SimpleSAML/XHTML/Template.php
index 47b5586ef..4c3ea3db9 100644
--- a/lib/SimpleSAML/XHTML/Template.php
+++ b/lib/SimpleSAML/XHTML/Template.php
@@ -96,12 +96,12 @@ class SimpleSAML_XHTML_Template
      */
     private function setupTwig()
     {
-        // TODO: Get cache-location from config
-        $cache = $this->configuration->resolvePath('cache');
+        $cache = $this->configuration->getString('template.cache', $this->configuration->resolvePath('cache'));
         // check if template exists
         $loader = $this->setupTwigTemplatepaths();
         if (!$loader) { return false; }
-        $auto_reload = true; // TODO: set this in config
+
+        $auto_reload = $this->configuration->getBoolean('template.auto_reload', false);
         $this->twig = new \Twig_Environment($loader, array('cache' => $cache, 'auto_reload' => $auto_reload));
         return true;
     }
-- 
GitLab