字段缓存和路由规则缓存 调试模式不生效

This commit is contained in:
thinkphp
2016-02-22 09:34:09 +08:00
parent 4d90185832
commit 71747579b9
3 changed files with 2 additions and 4 deletions

View File

@@ -1435,7 +1435,7 @@ class Model
}
// 记录字段类型信息
$result = ['fields' => $fields, 'bind' => $bind, 'type' => $type, 'pk' => $pk];
APP_DEBUG && Cache::set($guid, $result);
!APP_DEBUG && Cache::set($guid, $result, 0);
}
return $fetch ? $result[$fetch] : $result;
}

View File

@@ -272,7 +272,7 @@ class Url
$alias[$route][] = [$rule, $var];
}
}
Cache::set('think_route_alias', $alias);
!APP_DEBUG && Cache::set('think_route_alias', $alias);
return $alias;
}