Cache random hentai row for 5 minutes
This commit is contained in:
@@ -1,8 +1,12 @@
|
||||
<p class="leading-normal font-bold text-lg text-neutral-800 dark:text-white">
|
||||
Random
|
||||
Random <span class="font-light text-xs text-neutral-800/60 dark:text-white/40">(Cached for 5 minutes)</span>
|
||||
</p>
|
||||
|
||||
@php $random = \App\Models\Episode::inRandomOrder()->limit(8)->get(); @endphp
|
||||
@php
|
||||
$random = \cache()->remember('random_home', 300, function () {
|
||||
return \App\Models\Episode::inRandomOrder()->limit(8)->get(); ;
|
||||
});
|
||||
@endphp
|
||||
|
||||
<div class="mb-6">
|
||||
@include('home.partials.tab.template', ['episodes' => $random, 'showThumbnails' => false])
|
||||
|
Reference in New Issue
Block a user