优化Url类的路由缓存

This commit is contained in:
thinkphp
2016-07-03 09:14:54 +08:00
parent 8fe3e08706
commit fdfebe73f6

View File

@@ -258,6 +258,10 @@ class Url
// 生成路由映射并缓存
private static function getRouteAlias()
{
static $item = [];
if (!empty($item)) {
return $item;
}
if ($item = Cache::get('think_route_map')) {
return $item;
}