Skip to content

Commit 4e1a114

Browse files
committed
refactor: pass the session TTL to Redis::set() as an options array
1 parent 94e9a16 commit 4e1a114

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎system/Session/Handlers/RedisHandler.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ public function write($id, $data): bool
273273
$this->redis->expire($this->lockKey, 300);
274274

275275
if ($this->fingerprint !== ($fingerprint = md5($data)) || $this->keyExists === false) {
276-
if ($this->redis->set($this->keyPrefix . $id, $data, $this->sessionExpiration)) {
276+
if ($this->redis->set($this->keyPrefix . $id, $data, ['ex' => $this->sessionExpiration])) {
277277
$this->fingerprint = $fingerprint;
278278
$this->keyExists = true;
279279

0 commit comments

Comments
 (0)