fix:修复BUG/升级1.1.6版本
This commit is contained in:
12
vendor/topthink/think-cache/README.md
vendored
12
vendor/topthink/think-cache/README.md
vendored
@@ -2,6 +2,16 @@
|
||||
|
||||
用于PHP缓存管理(PHP 7.1+),支持`PSR-6`及`PSR-16`缓存规范。
|
||||
|
||||
主要特性包括:
|
||||
|
||||
* 支持多缓存通道设置及切换
|
||||
* 支持缓存数据递增/递减
|
||||
* 支持门面调用
|
||||
* 内置File/Redis/Memcache/Memcached/Wincache
|
||||
* 支持缓存标签
|
||||
* 支持闭包数据
|
||||
* 支持`PSR-6`及`PSR-16`缓存规范
|
||||
|
||||
## 安装
|
||||
~~~
|
||||
composer require topthink/think-cache
|
||||
@@ -73,3 +83,5 @@ $redis = Cache::store('redis');
|
||||
$redis->set('var','value',600);
|
||||
$redis->get('var');
|
||||
~~~
|
||||
|
||||
更多内容可以参考 https://www.kancloud.cn/manual/thinkphp6_0/1037634
|
||||
@@ -17,6 +17,7 @@ use Psr\Cache\CacheItemPoolInterface;
|
||||
use think\cache\Driver;
|
||||
use think\Container;
|
||||
use think\exception\InvalidArgumentException;
|
||||
use think\cache\CacheItem;
|
||||
|
||||
/**
|
||||
* 缓存管理类
|
||||
@@ -52,11 +53,12 @@ class CacheManager implements CacheItemPoolInterface
|
||||
* 初始化
|
||||
* @access public
|
||||
* @param array $config 配置参数
|
||||
* @return void
|
||||
* @return $this
|
||||
*/
|
||||
public function init(array $config = [])
|
||||
{
|
||||
$this->config = $config;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -17,7 +17,7 @@ use DateTime;
|
||||
use DateTimeInterface;
|
||||
use Opis\Closure\SerializableClosure;
|
||||
use Psr\SimpleCache\CacheInterface;
|
||||
use think\cache\exception\InvalidArgumentException;
|
||||
use think\exception\InvalidArgumentException;
|
||||
use think\Container;
|
||||
|
||||
/**
|
||||
|
||||
@@ -95,7 +95,7 @@ class File extends Driver
|
||||
* @param mixed $default 默认值
|
||||
* @return mixed
|
||||
*/
|
||||
public function get($name, $default = false)
|
||||
public function get($name, $default = null)
|
||||
{
|
||||
$this->readTimes++;
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ class Memcache extends Driver
|
||||
* @param mixed $default 默认值
|
||||
* @return mixed
|
||||
*/
|
||||
public function get($name, $default = false)
|
||||
public function get($name, $default = null)
|
||||
{
|
||||
$this->readTimes++;
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ class Memcached extends Driver
|
||||
* @param mixed $default 默认值
|
||||
* @return mixed
|
||||
*/
|
||||
public function get($name, $default = false)
|
||||
public function get($name, $default = null)
|
||||
{
|
||||
$this->readTimes++;
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ class Redis extends Driver
|
||||
* @param mixed $default 默认值
|
||||
* @return mixed
|
||||
*/
|
||||
public function get($name, $default = false)
|
||||
public function get($name, $default = null)
|
||||
{
|
||||
$this->readTimes++;
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ class Wincache extends Driver
|
||||
* @param mixed $default 默认值
|
||||
* @return mixed
|
||||
*/
|
||||
public function get($name, $default = false)
|
||||
public function get($name, $default = null)
|
||||
{
|
||||
$this->readTimes++;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user