cache api article for an hour
This commit is contained in:
@@ -15,7 +15,7 @@ class ArticlesController extends Controller
|
||||
*/
|
||||
public function show($source, $guid)
|
||||
{
|
||||
$article = Cache::remember("article_" . $source . "_" . $guid, 3600, function () use ($source, $guid) {
|
||||
$article = Cache::remember("article_" . $source . "_" . $guid, 3600, function () use ($source, $guid) { // Cache for an hour
|
||||
|
||||
return Article::whereHas('source', function ($q) use ($source) {
|
||||
$q->where('slug', $source);
|
||||
|
Reference in New Issue
Block a user