From a6ac8245e52e9b1d273d51b6910af93c223f3fff Mon Sep 17 00:00:00 2001 From: Matt Young Date: Sat, 15 Jun 2024 17:03:24 -0500 Subject: [PATCH] Remove irrelevant TODO --- app/Services/AuditionCacheService.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/Services/AuditionCacheService.php b/app/Services/AuditionCacheService.php index f277f28..1434a3c 100644 --- a/app/Services/AuditionCacheService.php +++ b/app/Services/AuditionCacheService.php @@ -4,6 +4,7 @@ namespace App\Services; use App\Models\Audition; use App\Models\ScoringGuide; +use Illuminate\Database\Eloquent\Collection; use Illuminate\Support\Facades\Cache; class AuditionCacheService @@ -17,8 +18,13 @@ class AuditionCacheService // } + /** + * Return or fill cache of auditions including the audition, + * scoringGuide.subscores, judges, judges_count, and entries_count + * @return Collection + */ public function getAuditions(): \Illuminate\Database\Eloquent\Collection - { //TODO have changes to judging assignments refresh the cache + { return Cache::rememberForever($this->cacheKey, function () { return Audition::with(['scoringGuide.subscores','judges']) ->withCount('judges')