Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
simplesamlphp
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Perun
Perun ProxyIdP
v1
simplesamlphp
Commits
66d5d0d8
Commit
66d5d0d8
authored
7 years ago
by
Jaime Pérez Crespo
Browse files
Options
Downloads
Patches
Plain Diff
Make sure the template cache can be used if "template.auto_reload" is set to true.
parent
8e9bf7c4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
config-templates/config.php
+10
-5
10 additions, 5 deletions
config-templates/config.php
lib/SimpleSAML/XHTML/Template.php
+1
-5
1 addition, 5 deletions
lib/SimpleSAML/XHTML/Template.php
with
11 additions
and
10 deletions
config-templates/config.php
+
10
−
5
View file @
66d5d0d8
...
@@ -725,14 +725,19 @@ $config = array(
...
@@ -725,14 +725,19 @@ $config = array(
*
*
* By default, twig templates are not cached. To turn on template caching:
* By default, twig templates are not cached. To turn on template caching:
* Set 'template.cache' to an absolute path pointing to a directory that
* Set 'template.cache' to an absolute path pointing to a directory that
* SimpleSAMLphp has read and write permissions to. Then, set
* SimpleSAMLphp has read and write permissions to.
* 'template.auto_reload' to false.
*
* When upgrading or changing themes, delete the contents of the cache.
*/
*/
'template.auto_reload'
=>
true
,
//'template.cache' => '',
//'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 |
| DISCOVERY SERVICE |
...
...
This diff is collapsed.
Click to expand it.
lib/SimpleSAML/XHTML/Template.php
+
1
−
5
View file @
66d5d0d8
...
@@ -162,11 +162,7 @@ class SimpleSAML_XHTML_Template
...
@@ -162,11 +162,7 @@ class SimpleSAML_XHTML_Template
private
function
setupTwig
()
private
function
setupTwig
()
{
{
$auto_reload
=
$this
->
configuration
->
getBoolean
(
'template.auto_reload'
,
true
);
$auto_reload
=
$this
->
configuration
->
getBoolean
(
'template.auto_reload'
,
true
);
$cache
=
false
;
$cache
=
$this
->
configuration
->
getString
(
'template.cache'
,
false
);
if
(
!
$auto_reload
)
{
// Cache only used if auto_reload = false
$cache
=
$this
->
configuration
->
getString
(
'template.cache'
,
$this
->
configuration
->
resolvePath
(
'cache'
));
}
// set up template paths
// set up template paths
$loader
=
$this
->
setupTwigTemplatepaths
();
$loader
=
$this
->
setupTwigTemplatepaths
();
// abort if twig template does not exist
// abort if twig template does not exist
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment