public function getSession($sessionIdentifier)
{
if ($this->currentSession !== null && $this->currentSession->isStarted() && $this->currentSession->getId() === $sessionIdentifier) {
return $this->currentSession;
}
if (isset($this->remoteSessions[$sessionIdentifier])) {
return $this->remoteSessions[$sessionIdentifier];
}
if ($this->metaDataCache->has($sessionIdentifier)) {
$sessionInfo = $this->metaDataCache->get($sessionIdentifier);
$this->remoteSessions[$sessionIdentifier] = new Session($sessionIdentifier, $sessionInfo['storageIdentifier'], $sessionInfo['lastActivityTimestamp'], $sessionInfo['tags']);
return $this->remoteSessions[$sessionIdentifier];
}
}