内核更新
This commit is contained in:
3
core/library/think/cache/driver/File.php
vendored
3
core/library/think/cache/driver/File.php
vendored
@@ -90,8 +90,7 @@ class File extends Driver
|
||||
*/
|
||||
public function has($name)
|
||||
{
|
||||
$filename = $this->getCacheKey($name);
|
||||
return is_file($filename);
|
||||
return $this->get($name) ? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
3
core/library/think/cache/driver/Lite.php
vendored
3
core/library/think/cache/driver/Lite.php
vendored
@@ -61,8 +61,7 @@ class Lite extends Driver
|
||||
*/
|
||||
public function has($name)
|
||||
{
|
||||
$filename = $this->getCacheKey($name);
|
||||
return is_file($filename);
|
||||
return $this->get($name) ? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,6 +24,7 @@ class Memcached extends Driver
|
||||
'prefix' => '',
|
||||
'username' => '', //账号
|
||||
'password' => '', //密码
|
||||
'option' => [],
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -40,6 +41,9 @@ class Memcached extends Driver
|
||||
$this->options = array_merge($this->options, $options);
|
||||
}
|
||||
$this->handler = new \Memcached;
|
||||
if (!empty($this->options['option'])) {
|
||||
$this->handler->setOptions($this->options['option']);
|
||||
}
|
||||
// 设置连接超时时间(单位:毫秒)
|
||||
if ($this->options['timeout'] > 0) {
|
||||
$this->handler->setOption(\Memcached::OPT_CONNECT_TIMEOUT, $this->options['timeout']);
|
||||
|
||||
Reference in New Issue
Block a user