fix(cache): respect default cache timeout on v1 chart data requests (#21441)

This commit is contained in:
Ville Brofeldt
2022-09-13 15:56:04 +02:00
committed by AAfghahi
parent 5239ed15db
commit a390f37079
4 changed files with 15 additions and 3 deletions

View File

@@ -410,6 +410,12 @@ class QueryContextProcessor:
cache_timeout_rv = self._query_context.get_cache_timeout()
if cache_timeout_rv:
return cache_timeout_rv
if (
data_cache_timeout := config["DATA_CACHE_CONFIG"].get(
"CACHE_DEFAULT_TIMEOUT"
)
) is not None:
return data_cache_timeout
return config["CACHE_DEFAULT_TIMEOUT"]
def cache_key(self, **extra: Any) -> str: