Fix: disable LLM cache recording while enable_llm_cache is disabled
This commit is contained in:
parent
69540b7c21
commit
2e95947c40
1 changed files with 3 additions and 0 deletions
|
|
@ -731,6 +731,9 @@ async def save_to_cache(hashing_kv, cache_data: CacheData):
|
|||
hashing_kv: The key-value storage for caching
|
||||
cache_data: The cache data to save
|
||||
"""
|
||||
if not hashing_kv.global_config.get("enable_llm_cache"):
|
||||
return
|
||||
|
||||
# Skip if storage is None or content is a streaming response
|
||||
if hashing_kv is None or not cache_data.content:
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue