55from apscheduler .datastores .sqlalchemy import SQLAlchemyDataStore
66from apscheduler .eventbrokers .redis import RedisEventBroker
77from fastapi import Depends , FastAPI
8- from fastapi_cache import FastAPICache
9- from fastapi_cache .backends .redis import RedisBackend
108
119from app .api .health import router as health_router
1210from app .api .nonsense import router as nonsense_router
1513from app .api .user import router as user_router
1614from app .config import settings as global_settings
1715from app .database import engine
18- from app .redis import get_cache , get_redis
16+ from app .redis import get_redis
1917from app .services .auth import AuthBearer
2018from app .services .scheduler import SchedulerMiddleware
2119from app .utils .logging import AppLogger
@@ -31,10 +29,7 @@ async def lifespan(_app: FastAPI):
3129 _postgres_dsn = global_settings .postgres_url .unicode_string ()
3230
3331 try :
34- # Initialize the cache with the redis connection
35- redis_cache = await get_cache ()
36- FastAPICache .init (RedisBackend (redis_cache ), prefix = "fastapi-cache" )
37- # logger.info(FastAPICache.get_cache_status_header())
32+ # TODO: cache with the redis connection
3833 # Initialize the postgres connection pool
3934 _app .postgres_pool = await asyncpg .create_pool (
4035 dsn = _postgres_dsn ,
0 commit comments