Is it safe to keep a state in Flask with Gunicorn

I have a gunicorn server with flask. I use the async gevant worker which means there are no real threads just async calls to increase the throughput per worker.

If I created a dict for example to hold an object that will be changed from time to time to mirror a changing file on disk.

caching_dic: dict = {}

Inside the request handling code, I will have something that will check the disk and if a new file is created, it will load the content of this file instead.

latest_timestamp = get_latest_timestamp_from_redis()
if entry_name in caching_dic and latest_timestamp == max_timestamp:"value is already locally cached")
    return caching_dic[entry_name]

target = read_from_disk(entry_name, latest_timestamp)
caching_dic[entry_name] = target
global max_timestamp
max_timestamp = latest_timestamp

I don't have much experience with gevant so I'm curious if this could potentially result in any issues ?

What would be the case if I changed the worker type later to sync worker with threads?

Why I'm doing so?

To save the time needed for deserialization as my goal is to achieve the minimum possible latency.