mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-09-03 13:51:38 +08:00
Cache类增加has方法 get方法支持默认值
This commit is contained in:
12
library/think/cache/driver/Redisd.php
vendored
12
library/think/cache/driver/Redisd.php
vendored
@@ -12,7 +12,6 @@
|
||||
namespace think\cache\driver;
|
||||
|
||||
use think\App;
|
||||
use think\Cache;
|
||||
use think\Exception;
|
||||
use think\Log;
|
||||
|
||||
@@ -199,6 +198,17 @@ class Redisd
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断缓存
|
||||
* @access public
|
||||
* @param string $name 缓存变量名
|
||||
* @return bool
|
||||
*/
|
||||
public function has($name)
|
||||
{
|
||||
return $this->get($name) ? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 读取缓存
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user