diff options
author | Jaime Perez Crespo <jaime.perez@uninett.no> | 2016-02-29 16:11:48 +0100 |
---|---|---|
committer | Jaime Perez Crespo <jaime.perez@uninett.no> | 2016-02-29 16:11:48 +0100 |
commit | 8af147c8d4fa9384b2959bd6aee30ca593cd0442 (patch) | |
tree | aeb184cc50e69e6d57abf6fbaf46f3e6dc5a9055 /lib/SimpleSAML/XHTML | |
parent | f66612385c58e18dfb86478ecd5698ab41af363a (diff) | |
download | simplesamlphp-8af147c8d4fa9384b2959bd6aee30ca593cd0442.zip simplesamlphp-8af147c8d4fa9384b2959bd6aee30ca593cd0442.tar.gz simplesamlphp-8af147c8d4fa9384b2959bd6aee30ca593cd0442.tar.bz2 |
Add a couple of configuration options to handle template caching.
Diffstat (limited to 'lib/SimpleSAML/XHTML')
-rw-r--r-- | lib/SimpleSAML/XHTML/Template.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/SimpleSAML/XHTML/Template.php b/lib/SimpleSAML/XHTML/Template.php index 47b5586..4c3ea3d 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; } |