vandonr-amz commented on code in PR #30704:
URL: https://github.com/apache/airflow/pull/30704#discussion_r1172974975
##########
airflow/utils/helpers.py:
##########
@@ -45,6 +45,15 @@
S = TypeVar("S")
+def get_value_with_cache(cache: dict, key: str, insert_fn: Callable, *arg,
**kwargs) -> Any:
+ """Returns value from cache or function"""
+ return_value = cache.get(key)
+ if not return_value:
+ return_value = cache[key] = insert_fn(*arg, **kwargs)
+
+ return return_value
Review Comment:
ok makes sense then. That specific case doesn't really matter for the
current application anyway.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]