请求缓存的有效期如果传入false表示不缓存 路由规则的cache参数传入false也同样表示不缓存 即使开启了全局请求缓存

This commit is contained in:
thinkphp
2016-11-09 13:53:36 +08:00
parent 53329b79b6
commit 7eaf95de9b
2 changed files with 7 additions and 4 deletions

View File

@@ -1491,7 +1491,7 @@ class Route
$result = self::parseModule($route);
}
// 开启请求缓存
if ($request->isGet() && !empty($option['cache'])) {
if ($request->isGet() && isset($option['cache'])) {
$cache = $option['cache'];
if (is_array($cache)) {
list($key, $expire) = $cache;