public function __construct(cache_AbstractHandler $cache, $options = array()) { $this->cache = $cache; $this->ttl = isset($options['life']) ? $options['life'] : SELF::DEFAULT_MAX_LIFE; ini_set('session.gc_divisor', 1); ini_set('session.gc_maxlifetime', $this->ttl); ini_set('session.gc_probability', 100); parent::__construct($options); }
public function __construct($options) { if (!isset($options['database'])) { throw new Exception('A database is needed for this storage method'); } $this->database = $options['database']; ini_set('session.gc_divisor', 1); ini_set('session.gc_maxlifetime', isset($options['life']) ? $options['life'] : 7200); ini_set('session.gc_probability', 100); parent::__construct($options); }