### Apache Airflow version

2.2.0 (latest released)

### Operating System

Red Hat Enterprise Linux Server 7.6 (Maipo)

### Versions of Apache Airflow Providers

_No response_

### Deployment

Virtualenv installation

### Deployment details

For this usecase - I am testing with a non-root user on a machine where the user does not have write access to /tmp. 
The `TMPDIR` environment variable is set to a different directory.

### What happened

When running webserver, errors like this are shown and slow down the webserver. 
```
[2021-10-25 13:46:51,164] {filesystemcache.py:224} ERROR - set key '\x1b[01m__wz_cache_count\x1b[22m' -> [Errno 1] Operation not permitted: '/tmp/tmpbw3h3p93.__wz_cache' -> '/tmp/2029240f6d1128be89ddc32729463129'
```

### What you expected to happen

Airflow should respect the `TMPDIR` environment variable and use a different temp dir

### How to reproduce

_No response_

### Anything else

_No response_

### 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)

airflow/www/app.py
#
#
#
#
import warnings
from datetime import timedelta
from typing import Optional
from flask import Flask
from flask_appbuilder import SQLA
from flask_caching import Cache
from flask_wtf.csrf import CSRFProtect
from airflow import settings
from airflow.configuration import conf
from airflow.logging_config import configure_logging