mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
请求缓存发送304
This commit is contained in:
@@ -1487,7 +1487,9 @@ class Request
|
||||
if (Cache::has($key)) {
|
||||
// 读取缓存
|
||||
$content = Cache::get($key);
|
||||
$response = Response::create($content)->header('Content-Type', Cache::get($key . '_header'));
|
||||
$response = Response::create($content)
|
||||
->code(304)
|
||||
->header('Content-Type', Cache::get($key . '_header'));
|
||||
throw new \think\exception\HttpResponseException($response);
|
||||
} else {
|
||||
$this->cache = [$key, $expire];
|
||||
|
||||
Reference in New Issue
Block a user