john-rodriguez-mgni commented on code in PR #61483:
URL: https://github.com/apache/airflow/pull/61483#discussion_r2770302359
##########
airflow-core/src/airflow/api_fastapi/core_api/datamodels/dags.py:
##########
@@ -41,6 +42,19 @@
if TYPE_CHECKING:
from airflow.serialization.definitions.param import SerializedParamsDict
+
+@lru_cache(maxsize=1)
+def _get_file_token_serializer() -> URLSafeSerializer:
Review Comment:
Good question - I used @lru_cache to ensure lazy initialization in case this
module is imported before the Airflow configuration is fully loaded. Is that
not a concern in this context? If the config is guaranteed to be loaded by the
time this module is imported, I'm happy to simplify to a module-level attribute.
--
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]