mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
cache助手函数支持判断缓存是否有效
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user