mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-09 22:31:41 +00:00
fix: add type hint ignore for user_api_key_cache and update docstring for EventDrivenCacheCoordinator
This commit is contained in:
parent
4dc950a242
commit
1f72ae5442
2 changed files with 5 additions and 2 deletions
|
|
@ -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,
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue