本番時はキャッシュしてもいいんじゃない?
This commit is contained in:
parent
b562b3b400
commit
3ea9476aa8
@ -59,7 +59,11 @@ Route::get('/ogp', function (Request $request) {
|
||||
}
|
||||
}
|
||||
|
||||
return response()->json($result);
|
||||
$response = response()->json($result);
|
||||
if (!config('app.debug')) {
|
||||
$response = $response->setCache(['public' => true, 'max_age' => 86400]);
|
||||
}
|
||||
return $response;
|
||||
} else {
|
||||
abort($res->getStatusCode());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user