diff --git a/src/api/core/warren/indicators/mixins.py b/src/api/core/warren/indicators/mixins.py index 7a25fa7e..5368d5ab 100644 --- a/src/api/core/warren/indicators/mixins.py +++ b/src/api/core/warren/indicators/mixins.py @@ -136,6 +136,9 @@ async def get_or_compute(self, update: bool = False): if issubclass(self._compute_annotation, BaseModel): value = value.json() + # Cache entry may have been created during a long compute time + cache = await self.get_cache() + if cache is None: cache = CacheEntry.parse_obj( CacheEntryCreate(key=self.cache_key, value=value)