File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33import logfire
44from fastapi import FastAPI
55from fastapi_cache import FastAPICache
6- from fastapi_cache .backends .redis import RedisBackend
7- from redis import asyncio as aioredis
6+ from fastapi_cache .backends .inmemory import InMemoryBackend
87from rich .console import Console
98
109from policyengine_api .api import api_router
@@ -30,10 +29,7 @@ async def lifespan(app: FastAPI):
3029 console .print ("[bold green]Database initialized[/bold green]" )
3130
3231 console .print ("[bold green]Initializing cache...[/bold green]" )
33- redis = aioredis .from_url (
34- settings .redis_url , encoding = "utf8" , decode_responses = True
35- )
36- FastAPICache .init (RedisBackend (redis ), prefix = "fastapi-cache" )
32+ FastAPICache .init (InMemoryBackend (), prefix = "fastapi-cache" )
3733 console .print ("[bold green]Cache initialized[/bold green]" )
3834
3935 yield
You can’t perform that action at this time.
0 commit comments