use cached scores
This commit is contained in:
parent
8f7a333898
commit
94ed41ee6f
|
|
@ -35,6 +35,10 @@ class AllowForOlympicScoring implements CalculateEntryScore
|
||||||
|
|
||||||
public function calculate(string $mode, Entry $entry): array
|
public function calculate(string $mode, Entry $entry): array
|
||||||
{
|
{
|
||||||
|
$calculated = CalculatedScore::where('entry_id', $entry->id)->where('mode', $mode)->first();
|
||||||
|
if ($calculated) {
|
||||||
|
return $calculated->calculatedScore;
|
||||||
|
}
|
||||||
|
|
||||||
$cacheKey = 'entryScore-'.$entry->id.'-'.$mode;
|
$cacheKey = 'entryScore-'.$entry->id.'-'.$mode;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue