diff --git a/config-templates/config.php b/config-templates/config.php index c3e8bb9300692f4e5ad0de380e12ad9d898466f7..f25f30b1e955ba0c01dd60ddf21254cb4f444aa0 100644 --- a/config-templates/config.php +++ b/config-templates/config.php @@ -725,14 +725,19 @@ $config = array( * * By default, twig templates are not cached. To turn on template caching: * Set 'template.cache' to an absolute path pointing to a directory that - * SimpleSAMLphp has read and write permissions to. Then, set - * 'template.auto_reload' to false. - * - * When upgrading or changing themes, delete the contents of the cache. + * SimpleSAMLphp has read and write permissions to. */ - 'template.auto_reload' => true, //'template.cache' => '', + /* + * Set the 'template.auto_reload' to true if you would like SimpleSAMLphp to + * recompile the templates (when using the template cache) if the templates + * change. If you don't want to check the source templates for every request, + * set it to false. + */ + 'template.auto_reload' => false, + + /********************* | DISCOVERY SERVICE | diff --git a/lib/SimpleSAML/XHTML/Template.php b/lib/SimpleSAML/XHTML/Template.php index ab2ebff0333af6fee61f98fdd812147bd6464268..8ee2f806f87a4988c17e412e98741921f5dff0ff 100644 --- a/lib/SimpleSAML/XHTML/Template.php +++ b/lib/SimpleSAML/XHTML/Template.php @@ -162,11 +162,7 @@ class SimpleSAML_XHTML_Template private function setupTwig() { $auto_reload = $this->configuration->getBoolean('template.auto_reload', true); - $cache = false; - if (!$auto_reload) { - // Cache only used if auto_reload = false - $cache = $this->configuration->getString('template.cache', $this->configuration->resolvePath('cache')); - } + $cache = $this->configuration->getString('template.cache', false); // set up template paths $loader = $this->setupTwigTemplatepaths(); // abort if twig template does not exist