From ea83ea2cce6b931579d02183cd048e109991911b Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Mon, 12 Jun 2023 18:33:06 +0800 Subject: [PATCH] update to 2.8.9, fix light cache wrong --- src/ZM/Store/LightCache.php | 4 ++-- src/ZM/Store/LightCacheInside.php | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ZM/Store/LightCache.php b/src/ZM/Store/LightCache.php index 64b5a545..0a701b2a 100644 --- a/src/ZM/Store/LightCache.php +++ b/src/ZM/Store/LightCache.php @@ -75,7 +75,7 @@ class LightCache } else { return false; } - $result = self::$kv_table->set((string)$k, [ + $result = self::$kv_table->set((string) $k, [ 'value' => $value, 'expire' => $v['expire'], 'data_type' => $data_type, @@ -191,7 +191,7 @@ class LightCache } elseif (is_bool($value)) { $data_type = 'bool'; $value = json_encode($value); - } else { + } else { throw new LightCacheException('E00048', 'Only can set string, array and int'); } try { diff --git a/src/ZM/Store/LightCacheInside.php b/src/ZM/Store/LightCacheInside.php index 468636dd..87700b5c 100644 --- a/src/ZM/Store/LightCacheInside.php +++ b/src/ZM/Store/LightCacheInside.php @@ -6,6 +6,7 @@ namespace ZM\Store; use Exception; use Swoole\Table; +use ZM\Config\ZMConfig; use ZM\Exception\LightCacheException; use ZM\Exception\ZMException;