fix(api): share operator summary cache through redis
This commit is contained in:
@@ -61,8 +61,8 @@ from src.services.ollama_failover_manager import (
|
||||
from src.services.ollama_health_monitor import HealthReport, HealthStatus
|
||||
from src.services.operator_outcome import build_operator_outcome
|
||||
from src.services.operator_summary_cache import (
|
||||
get_cached_operator_summary,
|
||||
store_operator_summary,
|
||||
get_cached_operator_summary_async,
|
||||
store_operator_summary_async,
|
||||
)
|
||||
from src.services.run_state_machine import transition
|
||||
|
||||
@@ -337,7 +337,7 @@ async def list_callback_replies(
|
||||
"per_page": per_page,
|
||||
}
|
||||
if not refresh:
|
||||
cached_response = get_cached_operator_summary(
|
||||
cached_response = await get_cached_operator_summary_async(
|
||||
"callback_replies",
|
||||
cache_key,
|
||||
ttl_seconds=_CALLBACK_REPLY_CACHE_TTL_SECONDS,
|
||||
@@ -515,7 +515,7 @@ async def list_callback_replies(
|
||||
cache_status="miss",
|
||||
cache_ttl_seconds=_CALLBACK_REPLY_CACHE_TTL_SECONDS,
|
||||
)
|
||||
return store_operator_summary(
|
||||
return await store_operator_summary_async(
|
||||
"callback_replies",
|
||||
cache_key,
|
||||
response,
|
||||
|
||||
Reference in New Issue
Block a user