fix: add type hint ignore for user_api_key_cache and update docstring for EventDrivenCacheCoordinator

This commit is contained in:
harish-berri 2026-04-30 22:06:33 +00:00
parent 4dc950a242
commit 1f72ae5442
2 changed files with 5 additions and 2 deletions

View file

@ -345,7 +345,7 @@ async def _fetch_global_spend_with_event_coordination(
return await _global_spend_coordinator.get_or_load(
cache_key=cache_key,
cache=user_api_key_cache,
cache=user_api_key_cache, # pyright: ignore[reportArgumentType]
load_fn=_load_global_spend,
)

View file

@ -52,6 +52,9 @@ class EventDrivenCacheCoordinator:
- Other requests: wait for the signal, then read from cache.
Create one instance per resource (e.g. one for global spend, one for feature flags).
Args:
log_prefix: Prefix for debug log messages.
"""
def __init__(self, log_prefix: str = "[CACHE]"):
@ -150,7 +153,7 @@ class EventDrivenCacheCoordinator:
elapsed_ms,
value,
)
await cache.async_set_cache(key=cache_key, value=value)
if self._log_prefix:
verbose_proxy_logger.debug("%s Result cached", self._log_prefix)