fastapi-cache
fastapi-cache copied to clipboard
ImportError: cannot import name 'FastAPICache' from 'fastapi_cache'
I got an import error when running examples app from this repo, in both Redis and InMemory cache examples.
ImportError: cannot import name 'FastAPICache' from 'fastapi_cache'
the line got error
from fastapi_cache import FastAPICache
python version 3.11.10 does anyone encounter this issue before or know how can I fix it?
It must be a new upload to pypi; there is no __init__.py installed, whence the error. You can check out (I am not affiliated) fastapi-cache2-fork package instead which works (but is only available for python 3.11 and 3.12).
you need to install fastapi_cache2