Skip to content

Commit 6a3f169

Browse files
tvdijenthijskh
andauthored
Add cachedir-setting and use it for Symfony cache (#1932)
* Add cachedir-setting and use it for Symfony cache * s/Symfony/SimpleSAMLphp Co-authored-by: Thijs Kinkhorst <thijs@kinkhorst.com> * Remove tempdir --------- Co-authored-by: Thijs Kinkhorst <thijs@kinkhorst.com>
1 parent 091a30a commit 6a3f169

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

config/config.php.dist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,17 @@ $config = [
5858
/*
5959
* The following settings are *filesystem paths* which define where
6060
* SimpleSAMLphp can find or write the following things:
61+
* - 'cachedir': Where SimpleSAMLphp can write its cache.
6162
* - 'loggingdir': Where to write logs. MUST be set to NULL when using a logging
6263
* handler other than `file`.
6364
* - 'datadir': Storage of general data.
64-
* - 'tempdir': Saving temporary files. SimpleSAMLphp will attempt to create
6565
* this directory if it doesn't exist.
6666
* When specified as a relative path, this is relative to the SimpleSAMLphp
6767
* root directory.
6868
*/
69+
'cachedir' => '/var/cache/simplesamlphp',
6970
//'loggingdir' => '/var/log/',
7071
//'datadir' => '/var/data/',
71-
'tempdir' => '/tmp/simplesaml',
7272

7373
/*
7474
* Certificate and key material can be loaded from different possible

src/SimpleSAML/Kernel.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ public function __construct(string $module)
5151
public function getCacheDir(): string
5252
{
5353
$configuration = Configuration::getInstance();
54-
$cachePath = $configuration->getString('tempdir') . DIRECTORY_SEPARATOR
55-
. 'cache' . DIRECTORY_SEPARATOR . $this->module;
54+
$cachePath = $configuration->getString('cachedir') . DIRECTORY_SEPARATOR . $this->module;
5655

5756
$sysUtils = new System();
5857
if ($sysUtils->isAbsolutePath($cachePath)) {

0 commit comments

Comments
 (0)