Skip to content

Commit 0d03360

Browse files
committed
- Redis handler always uses the TTL in setex()
1 parent adf33c9 commit 0d03360

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

Handler/RedisHandler.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,7 @@ public function read($sessionId): string
5656

5757
public function write($sessionId, $sessionData): bool
5858
{
59-
if ($this->ttl > 0) {
60-
return $this->client->setex($sessionId, $this->ttl, $sessionData);
61-
}
62-
63-
return $this->client->set($sessionId, $sessionData, $this->ttl);
59+
return $this->client->setex($sessionId, $this->ttl, $sessionData);
6460
}
6561

6662
public function open($savePath, $sessionId): bool

0 commit comments

Comments
 (0)