mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
cache助手函数支持清空操作 cache(null) 或者 cache(null,'tagName');
This commit is contained in:
@@ -359,7 +359,9 @@ if (!function_exists('cache')) {
|
||||
// 缓存初始化
|
||||
return Cache::connect($name);
|
||||
}
|
||||
if ('' === $value) {
|
||||
if (is_null($name)) {
|
||||
return Cache::clear($value);
|
||||
} elseif ('' === $value) {
|
||||
// 获取缓存
|
||||
return 0 === strpos($name, '?') ? Cache::has(substr($name, 1)) : Cache::get($name);
|
||||
} elseif (is_null($value)) {
|
||||
|
||||
Reference in New Issue
Block a user