VertexToEdge opened a new issue, #39344: URL: https://github.com/apache/airflow/issues/39344
### Apache Airflow version Other Airflow 2 version (please specify below) ### If "Other Airflow 2 version" selected, which one? 2.3.x ~ 2.9.x ### What happened? Recently, I migrated airflow version 2.2.0 to 2.9.0 and python 3.8 to 3.12. and i experienced too much load time in airflow web dashboard. in airflow 2.2.0, airflow dashboard loaded almost instantly. but in 2.9.0, it tooks almost 10 seconds. ## Airflow 2.2.0 <img width="960" alt="image" src="https://github.com/apache/airflow/assets/37045096/1d648049-424c-44a1-a505-24fe213f43a7"> ## Airflow 2.9.0 <img width="960" alt="image" src="https://github.com/apache/airflow/assets/37045096/ecb58aca-93e9-483f-8e14-d0dc3ce3df6f"> ### What you think should happen instead? I think there is no reason to make slow page loading time because of not using static file caching. And I figured out the root cause. the problem is airflow webserver's caching is disabled because of bumping up Flask version 1.x to 2.x. In Flask, there is Configuration Option for static file's Expire time for cache-control. it is `SEND_FILE_MAX_AGE_DEFAULT`. In Flask 1.1.x, the default value of `SEND_FILE_MAX_AGE_DEFAULT` is 12 hours. https://flask.palletsprojects.com/en/1.1.x/api/#flask.Flask.send_file_max_age_default  After Flask 2.0.x, the default value of `SEND_FILE_MAX_AGE_DEFAULT` is changed to None. https://flask.palletsprojects.com/en/2.0.x/api/#flask.Flask.send_file_max_age_default  after Airflow 2.3.0, Flask version is upgraded to 2.0.x. When i added flask configuration in app.py static file caching works well.   example is here. https://github.com/VertexToEdge/airflow-docker-compose ### How to reproduce I followed setup instruction in https://airflow.apache.org/docs/apache-airflow/stable/howto/docker-compose/index.html 1. Setup Airflow 2.9.0 with docker-compose ``` bash curl -LfO 'https://airflow.apache.org/docs/apache-airflow/2.9.0/docker-compose.yaml' AIRFLOW_UID=$(id -u) docker compose up ``` 2. access airflow webserver with webbrowser. and refresh the page. ### Operating System Ubuntu 22.04.3 LTS ### Versions of Apache Airflow Providers _No response_ ### Deployment Docker-Compose ### Deployment details _No response_ ### Anything else? I am newbie in Airflow. I read airflow installation guide and configruation reference. but I'm not sure if there is a better way to do this without changing the code. Is there any way to configure static file caching? please just talk to me. thanks for reading. have a good day. ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md) -- 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]
