From 03968871dbf295112b8fae65c5f52fe741b751a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20H=C3=BCnig?= Date: Sun, 30 Aug 2020 20:52:05 +0200 Subject: [PATCH] replace "DEL" Commands with "UNLINK" This PR replaces DEL Command with UNLINK command. Details about UNLINK can be found here https://redis.io/commands/unlink . As noticed here redis/redis#1748 (comment) this will not change the behavior. As there is no check of Redis version included, it will break Redis Versions < 4.0 through. As Redis 4.0 was released on 2017-07-14 and Redis 3 went EOL with the Redis 5 on 2018-10-17, I don't expect this being an issue. See also https://github.com/colinmollenhour/Cm_Cache_Backend_Redis/issues/158 for details. --- src/Cm/RedisSession/Handler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cm/RedisSession/Handler.php b/src/Cm/RedisSession/Handler.php index 3b901b2..55cca71 100644 --- a/src/Cm/RedisSession/Handler.php +++ b/src/Cm/RedisSession/Handler.php @@ -666,7 +666,7 @@ public function destroy($sessionId) $this->_log(sprintf("Destroying ID %s", $sessionId)); $this->_redis->pipeline(); if($this->_dbNum) $this->_redis->select($this->_dbNum); - $this->_redis->del(self::SESSION_PREFIX.$sessionId); + $this->_redis->unlink(self::SESSION_PREFIX.$sessionId); $this->_redis->exec(); return true; }