fix: invalidate cache when creating summaries

This commit is contained in:
Rajat Ahuja 2025-11-20 10:22:17 -05:00
parent 0f1e1dec20
commit 47d2cb5ab7
1 changed files with 5 additions and 0 deletions

View File

@ -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,