Skip to content

Commit

Permalink
Let module decide lifetime of keys
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob Christiansen committed Jan 19, 2015
1 parent e888dec commit 1394233
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion config-templates/module_redis.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
<?php
/**
* Configuration template for the Redis moduel for simpleSAMLphp
*/
$config = array (
// Redis server
'host' => 'tcp://localhost:6379',

// Key prefix
'prefix' => 'simplaSAMLphp'
'prefix' => 'simplaSAMLphp',

// Lifitime for all non expiring keys
'lifetime' => 288000
);
Empty file added enable
Empty file.
2 changes: 1 addition & 1 deletion lib/Store/Redis.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ protected function __construct()

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

/**
Expand Down

0 comments on commit 1394233

Please sign in to comment.