From 6ec2bf2880abdc023e1e7b42360465699682d0dc Mon Sep 17 00:00:00 2001 From: Hide_D Date: Mon, 25 Apr 2022 00:33:23 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20KVStorage=EC=97=90=EC=84=9C=20mb=5Fstrto?= =?UTF-8?q?lower=EB=A5=BC=20=EC=A0=9C=EA=B1=B0=ED=95=98=EC=97=AC=20?= =?UTF-8?q?=EB=8C=80=EC=86=8C=EB=AC=B8=EC=9E=90=20=EA=B5=AC=EB=B6=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/sammo/KVStorage.php | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/sammo/KVStorage.php b/src/sammo/KVStorage.php index 2e52073e..1e084251 100644 --- a/src/sammo/KVStorage.php +++ b/src/sammo/KVStorage.php @@ -84,9 +84,6 @@ class KVStorage{ } public function invalidateCacheValue($key):self{ - if(is_string($key)){ - $key = mb_strtolower($key); - } if($this->cacheData === null){ return $this; } @@ -100,7 +97,6 @@ class KVStorage{ if($this->cacheData === null){ return $this; } - $keys = array_map('mb_strtolower', $keys); foreach($keys as $key){ if(key_exists($key, $this->cacheData)){ @@ -123,7 +119,6 @@ class KVStorage{ if($this->cacheData === null){ $this->cacheData = []; } - $keys = array_map('mb_strtolower', $keys); if($invalidateAll){ $notExists = $keys; @@ -168,7 +163,6 @@ class KVStorage{ if(!$keys){ return []; } - $keys = array_map('mb_strtolower', $keys); $dictResult = $this->getValues($keys, $onlyCache); $result = []; foreach($keys as $key){ @@ -181,7 +175,6 @@ class KVStorage{ if(!$keys){ return []; } - $keys = array_map('mb_strtolower', $keys); if ($this->cacheData === null) { return $this->getDBValues($keys); } @@ -221,9 +214,6 @@ class KVStorage{ * @return mixed|null */ public function getValue($key, bool $onlyCache=false){ - if(is_string($key)){ - $key = mb_strtolower($key); - } if($this->cacheData !== null && ($onlyCache || key_exists($key, $this->cacheData))){ return $this->cacheData[$key] ?? null; } @@ -243,9 +233,6 @@ class KVStorage{ * @throws MeekroDBException */ public function setValue($key, $value):self{ - if(is_string($key)){ - $key = mb_strtolower($key); - } if($value === null){ return $this->deleteValue($key); } @@ -264,9 +251,6 @@ class KVStorage{ * @throws MeekroDBException */ public function deleteValue($key):self{ - if(is_string($key)){ - $key = mb_strtolower($key); - } if(isset($this->cacheData[$key])){ unset($this->cacheData[$key]); }