diff --git a/src/utils/summarizer.py b/src/utils/summarizer.py index 084672ed..67eb3467 100644 --- a/src/utils/summarizer.py +++ b/src/utils/summarizer.py @@ -10,7 +10,9 @@ from sqlalchemy import update from sqlalchemy.ext.asyncio import AsyncSession from src import prometheus, schemas +from src.cache.client import cache as cache_client from src.config import settings +from src.crud.session import session_cache_key from src.dependencies import tracked_db from src.exceptions import ResourceNotFoundException from src.utils.clients import HonchoLLMCallResponse, honcho_llm_call @@ -534,6 +536,9 @@ async def _save_summary( await db.execute(stmt) await db.commit() + cache_key = session_cache_key(workspace_name, session_name) + await cache_client.delete(cache_key) + async def get_summarized_history( db: AsyncSession,