内核更新
This commit is contained in:
@@ -11,9 +11,11 @@
|
||||
|
||||
namespace think;
|
||||
|
||||
use think\Cache;
|
||||
use think\Config;
|
||||
use think\Debug;
|
||||
use think\Env;
|
||||
use think\Request;
|
||||
use think\response\Json as JsonResponse;
|
||||
use think\response\Jsonp as JsonpResponse;
|
||||
use think\response\Redirect as RedirectResponse;
|
||||
@@ -111,11 +113,21 @@ class Response
|
||||
}
|
||||
echo $data;
|
||||
|
||||
if (200 == $this->code) {
|
||||
$cache = Request::instance()->getCache();
|
||||
if ($cache) {
|
||||
Cache::set($cache[0], $data, $cache[1]);
|
||||
Cache::set($cache[0] . '_header', $this->header['Content-Type']);
|
||||
}
|
||||
}
|
||||
|
||||
if (function_exists('fastcgi_finish_request')) {
|
||||
// 提高页面响应
|
||||
fastcgi_finish_request();
|
||||
}
|
||||
|
||||
// 监听response_end
|
||||
Hook::listen('response_end', $this);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user