22 $this->readOnly = $options[
'readOnly'] ??
false;
23 $this->prefix = $options[
'keyPrefix'] ??
'BX';
24 $this->exclusiveLock = $options[
'exclusiveLock'] ??
false;
27 $connectionPool->setConnectionParameters(self::SESSION_MEMCACHE_CONNECTION, [
28 'className' => MemcacheConnection::class,
29 'host' => $options[
'host'] ??
'127.0.0.1',
30 'port' => (
int)($options[
'port'] ?? 11211),
31 'connectionTimeout' => $options[
'connectionTimeout'] ?? 1,
32 'servers' => $options[
'servers'] ?? [],
140 $lockWait = 59000000;
144 if ($this->exclusiveLock)
149 while (!$this->connection->add($sid .
$sessionId .
".lock", $lock, 0, $lockTimeout))
151 if ($this->connection->increment($sid .
$sessionId .
".lock", 1) === 1)
153 $this->connection->replace($sid .
$sessionId .
".lock", $lock, 0, $lockTimeout);
158 $lockWait -= $waitStep;
164 $lockedUri = $this->connection->get($sid .
$sessionId .
".lock");
165 if ($lockedUri && $lockedUri != 1)
167 $errorText .= sprintf(
' Locked by "%s".', $lockedUri);
174 if ($waitStep < 1000000)