mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-02 07:13:02 +00:00
fix(caching): retain explicit cache guard for async reads
This commit is contained in:
parent
62a81d4205
commit
63fbd57f61
1 changed files with 2 additions and 4 deletions
|
|
@ -208,10 +208,8 @@ class LLMCachingHandler:
|
|||
"""
|
||||
# Check if caching should be performed BEFORE doing expensive operations
|
||||
if (
|
||||
(
|
||||
(kwargs.get("caching", None) is None and litellm.cache is not None)
|
||||
or kwargs.get("caching", False) is True
|
||||
)
|
||||
litellm.cache is not None
|
||||
and (kwargs.get("caching", None) is None or kwargs.get("caching", False) is True)
|
||||
and (kwargs.get("cache", {}).get("no-cache", False) is not True)
|
||||
and self._is_call_type_supported_by_cache(
|
||||
original_function=original_function, call_type=call_type, kwargs=kwargs
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue