From b3186cce3a7d499cfc21177a69243e457ae96277 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sun, 8 Dec 2019 10:00:37 +0100 Subject: [PATCH] debug reverse value for replace --- DataStorage/Cache/Connection/RedisCache.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/DataStorage/Cache/Connection/RedisCache.php b/DataStorage/Cache/Connection/RedisCache.php index 5dcc86c0c..a0823316d 100644 --- a/DataStorage/Cache/Connection/RedisCache.php +++ b/DataStorage/Cache/Connection/RedisCache.php @@ -133,7 +133,7 @@ class RedisCache extends ConnectionAbstract */ public function get($key, int $expire = -1) { - if ($this->status !== CacheStatus::OK || !$this->con->exists($key)) { + if ($this->status !== CacheStatus::OK || $this->con->exists($key) < 1) { return null; } @@ -197,8 +197,6 @@ class RedisCache extends ConnectionAbstract return false; } - // todo: parse value - if ($this->con->exists($key) > 0) { $this->set($key, $this->build($value), $expire); @@ -306,6 +304,7 @@ class RedisCache extends ConnectionAbstract */ private function reverseValue(int $type, $raw, int $start) { + var_dump($raw); switch ($type) { case CacheValueType::_INT: return (int) \substr($raw, $start + 1);