public function __construct($redis, array $options = array(), $prefix = 'session', $locking = true, $spinLockWait = 150000)
{
$this->redis = $redis;
$this->ttl = isset($options['gc_maxlifetime']) ? (int) $options['gc_maxlifetime'] : 0;
if (isset($options['cookie_lifetime']) && $options['cookie_lifetime'] > $this->ttl) {
$this->ttl = (int) $options['cookie_lifetime'];
}
$this->prefix = $prefix;
$this->locking = $locking;
$this->locked = false;
$this->lockKey = null;
$this->spinLockWait = $spinLockWait;
$this->lockMaxWait = ini_get('max_execution_time');
if (!$this->lockMaxWait) {
$this->lockMaxWait = self::DEFAULT_MAX_EXECUTION_TIME;
}
}