diff --git a/library/think/Request.php b/library/think/Request.php index 6c19c44a..1a8b6046 100644 --- a/library/think/Request.php +++ b/library/think/Request.php @@ -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];