MCPcopy Create free account
hub / github.com/BerriAI/litellm / create_cache_write_task

Function create_cache_write_task

litellm/caching/caching_handler.py:292–297  ·  view source on GitHub ↗
(write_factory: Callable[[], Awaitable[None]])

Source from the content-addressed store, hash-verified

290
291
292def create_cache_write_task(write_factory: Callable[[], Awaitable[None]]) -> "asyncio.Task[None]":
293 with post_response_phase():
294 task: Final = asyncio.create_task(_complete_cache_write_despite_cancellation(write_factory))
295 _PENDING_CACHE_WRITES.add(task)
296 task.add_done_callback(_PENDING_CACHE_WRITES.discard)
297 return task
298
299
300def _request_cache_key(request_kwargs: Mapping[str, Any]) -> str | None:

Callers 3

_persistMethod · 0.90
async_set_cacheMethod · 0.85

Calls 3

post_response_phaseFunction · 0.90
addMethod · 0.45

Tested by

no test coverage detected