Skip to content

Commit 1394233

Browse files
author
Jacob Christiansen
committed
Let module decide lifetime of keys
1 parent e888dec commit 1394233

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

config-templates/module_redis.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
<?php
2+
/**
3+
* Configuration template for the Redis moduel for simpleSAMLphp
4+
*/
25
$config = array (
36
// Redis server
47
'host' => 'tcp://localhost:6379',
8+
59
// Key prefix
6-
'prefix' => 'simplaSAMLphp'
10+
'prefix' => 'simplaSAMLphp',
11+
12+
// Lifitime for all non expiring keys
13+
'lifetime' => 288000
714
);

enable

Whitespace-only changes.

lib/Store/Redis.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ protected function __construct()
1919

2020
$this->redis = new Predis\Client($redisConfig->getString('host', 'localhost'));
2121
$this->prefix = $redisConfig->getString('prefix', 'simpleSAMLphp');
22-
$this->lifeTime = $globalConfig->getInteger('session.duration', 28800); // Default 8 hours
22+
$this->lifeTime = $redisConfig->getInteger('lifetime', 28800); // 8 hours
2323
}
2424

2525
/**

0 commit comments

Comments
 (0)