function RedisSessionHandler::doWrite
Overrides AbstractSessionHandler::doWrite
File
-
vendor/
symfony/ http-foundation/ Session/ Storage/ Handler/ RedisSessionHandler.php, line 59
Class
- RedisSessionHandler
- Redis based session storage handler based on the Redis class provided by the PHP redis extension.
Namespace
Symfony\Component\HttpFoundation\Session\Storage\HandlerCode
protected function doWrite(string $sessionId, string $data) : bool {
$ttl = ($this->ttl instanceof \Closure ? ($this->ttl)() : $this->ttl) ?? \ini_get('session.gc_maxlifetime');
$result = $this->redis
->setEx($this->prefix . $sessionId, (int) $ttl, $data);
return $result && !$result instanceof ErrorInterface;
}