diff --git a/helper.php b/helper.php index b9590d60..11f0b76c 100644 --- a/helper.php +++ b/helper.php @@ -361,7 +361,7 @@ if (!function_exists('cache')) { } if ('' === $value) { // 获取缓存 - return Cache::get($name); + return 0 === strpos($name, '?') ? Cache::has(substr($name, 1)) : Cache::get($name); } elseif (is_null($value)) { // 删除缓存 return Cache::rm($name);