Add a shitload of caching
Some checks are pending
Build Formula10 Docker Image / build-docker (push) Waiting to run

This commit is contained in:
2024-09-24 00:01:41 +02:00
parent 852f0a04ca
commit 6da5919f86
10 changed files with 242 additions and 168 deletions

View File

@ -1,5 +1,5 @@
from typing import List, Callable
from formula10 import ENABLE_TIMING
from formula10 import ENABLE_TIMING, cache
from formula10.domain.domain_model import Model
from formula10.domain.model.driver import Driver
@ -54,6 +54,7 @@ class TemplateModel(Model):
return self.all_users()
@cache.cached(timeout=None, key_prefix="template_first_race_without_result") # Cleanup when adding/updating race results
def first_race_without_result(self) -> Race | None:
"""
Returns the first race-object with no associated race result.