diff --git a/library/think/Cache.php b/library/think/Cache.php index 00be217f..1e31a96b 100644 --- a/library/think/Cache.php +++ b/library/think/Cache.php @@ -81,8 +81,8 @@ class Cache $default = Config::get('cache.default'); // 获取默认缓存配置,并连接 $options = Config::get('cache.' . $default['type']) ?: Config::get('cache.default'); - } else { - $options = !empty($options) ? $options : Config::get('cache'); + } elseif (empty($options)) { + $options = Config::get('cache'); } self::$handler = self::connect($options);