调整请求缓存自动检查位置

This commit is contained in:
thinkphp
2016-11-01 17:57:06 +08:00
parent 57f206b757
commit bef0eebaed

View File

@@ -115,8 +115,6 @@ class App
// 进行URL路由检测 // 进行URL路由检测
$dispatch = self::routeCheck($request, $config); $dispatch = self::routeCheck($request, $config);
} }
// 请求缓存检查
$request->cache($config['request_cache']);
// 记录当前调度信息 // 记录当前调度信息
$request->dispatch($dispatch); $request->dispatch($dispatch);
@@ -129,6 +127,8 @@ class App
// 监听app_begin // 监听app_begin
Hook::listen('app_begin', $dispatch); Hook::listen('app_begin', $dispatch);
// 请求缓存检查
$request->cache($config['request_cache']);
switch ($dispatch['type']) { switch ($dispatch['type']) {
case 'redirect': case 'redirect':