fastapi-cache
fastapi-cache copied to clipboard
Added typehint for Callable[P, R] in the decorator
My colleague and I had the issue that we had to use async everytime we use the cache decorator, even if we didn't want to mark that function as async. In the decorator.py we saw that you support Coroutines and Callables (by calling run_in_threadpool) but the typehint for the func only supported Coroutines.
Thanks and best wishes!