FastAPI Cache
from fastapi_cache import FastAPICache
from fastapi_cache.backends.inmemory import InMemoryBackend
cache = FastAPICache(
backend=InMemoryBackend()
)from fastapi_cache import FastAPICache
from fastapi_cache.backends.redis import RedisBackend
cache = FastAPICache(
backend=RedisBackend(host="localhost", port=6379)
)from fastapi_cache import FastAPICache
from fastapi_cache.backends.memcached import MemcachedBackend
cache = FastAPICache(
backend=MemcachedBackend(host="localhost", port=11211)
)