Be sure to clear cache's after making a doubler decision

This commit is contained in:
Matt Young 2024-11-22 08:51:51 -06:00
parent fd07254e3e
commit 005160097b
1 changed files with 6 additions and 1 deletions

View File

@ -41,8 +41,11 @@ class DoublerDecision
}
public function accept($entry): void
public function accept(Entry $entry): void
{
Cache::forget('audition'.$entry->audition_id.'seating');
Cache::forget('audition'.$entry->audition_id.'advancement');
// Decline all other entries and clear rank cache
$doublerInfo = $this->doublerService->simpleDoubleInfo($entry);
foreach ($doublerInfo as $doublerEntry) {
@ -59,6 +62,8 @@ class DoublerDecision
*/
public function decline($entry): void
{
Cache::forget('audition'.$entry->audition_id.'seating');
Cache::forget('audition'.$entry->audition_id.'advancement');
if ($entry->hasFlag('declined')) {
throw new AuditionAdminException('Entry is already declined');
}