Skip to content
Snippets Groups Projects
Commit 8af147c8 authored by Jaime Perez Crespo's avatar Jaime Perez Crespo
Browse files

Add a couple of configuration options to handle template caching.

parent f6661238
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment