shyft-mike commented on code in PR #28846: URL: https://github.com/apache/airflow/pull/28846#discussion_r1082832047
########## airflow/www/app.py: ########## @@ -131,7 +132,29 @@ def create_app(config=None, testing=False): init_robots(flask_app) + # Configure caching + webserver_caching_hash_method = conf.get(section="webserver", key="CACHING_HASH_METHOD", fallback=None) cache_config = {"CACHE_TYPE": "flask_caching.backends.filesystem", "CACHE_DIR": gettempdir()} + + if ( + webserver_caching_hash_method is not None + and webserver_caching_hash_method.casefold() != "md5".casefold() + ): + if webserver_caching_hash_method.casefold() == "sha512".casefold(): + cache_config["CACHE_OPTIONS"] = {"hash_method": hashlib.sha512} + elif webserver_caching_hash_method.casefold() == "sha384".casefold(): + cache_config["CACHE_OPTIONS"] = {"hash_method": hashlib.sha384} + elif webserver_caching_hash_method.casefold() == "sha256".casefold(): + cache_config["CACHE_OPTIONS"] = {"hash_method": hashlib.sha256} + elif webserver_caching_hash_method.casefold() == "sha224".casefold(): Review Comment: This should be cleaned up quite a bit now :+1: -- 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: commits-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org