Cache类store方法参数允许为空 表示获取当前缓存驱动句柄

This commit is contained in:
thinkphp
2017-01-26 09:56:21 +08:00
parent 7d517177bc
commit 2ef5da7b1b

View File

@@ -81,9 +81,9 @@ class Cache
* @param string $name 缓存标识
* @return Driver
*/
public static function store($name)
public static function store($name = '')
{
if ('complex' == Config::get('cache.type')) {
if ('' !== $name && 'complex' == Config::get('cache.type')) {
self::connect(Config::get('cache.' . $name), strtolower($name));
}
return self::$handler;