From 2f3298115216eead736f3a4dc77446343c00f8b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D1=8F=D0=BA=D1=81=D0=B5=D0=B9=20=D0=97=D0=B0?= =?UTF-8?q?=D0=B9=D1=86=D0=B0=D1=9E?= Date: Wed, 26 Jul 2023 13:46:36 +0300 Subject: [PATCH] Fix A ArrayCache.php --- framework/caching/ArrayCache.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/framework/caching/ArrayCache.php b/framework/caching/ArrayCache.php index d8fdaf61b18..7c326cc9ec9 100644 --- a/framework/caching/ArrayCache.php +++ b/framework/caching/ArrayCache.php @@ -41,6 +41,7 @@ public function exists($key) */ protected function getValue($key) { + $key = $this->buildKey($key); if (isset($this->_cache[$key]) && ($this->_cache[$key][1] === 0 || $this->_cache[$key][1] > microtime(true))) { return $this->_cache[$key][0]; } @@ -53,6 +54,7 @@ protected function getValue($key) */ protected function setValue($key, $value, $duration) { + $key = $this->buildKey($key); $this->_cache[$key] = [$value, $duration === 0 ? 0 : microtime(true) + $duration]; return true; } @@ -62,6 +64,7 @@ protected function setValue($key, $value, $duration) */ protected function addValue($key, $value, $duration) { + $key = $this->buildKey($key); if (isset($this->_cache[$key]) && ($this->_cache[$key][1] === 0 || $this->_cache[$key][1] > microtime(true))) { return false; } @@ -74,6 +77,7 @@ protected function addValue($key, $value, $duration) */ protected function deleteValue($key) { + $key = $this->buildKey($key); unset($this->_cache[$key]); return true; }