forked from phoenix/litellm-mirror
fix redis async_set_cache_pipeline when empty list passed to it (#5962)
This commit is contained in:
parent
eb325cce7d
commit
7500855654
1 changed files with 3 additions and 0 deletions
|
@ -461,6 +461,9 @@ class RedisCache(BaseCache):
|
||||||
"""
|
"""
|
||||||
Use Redis Pipelines for bulk write operations
|
Use Redis Pipelines for bulk write operations
|
||||||
"""
|
"""
|
||||||
|
# don't waste a network request if there's nothing to set
|
||||||
|
if len(cache_list) == 0:
|
||||||
|
return
|
||||||
from redis.asyncio import Redis
|
from redis.asyncio import Redis
|
||||||
|
|
||||||
_redis_client: Redis = self.init_async_client() # type: ignore
|
_redis_client: Redis = self.init_async_client() # type: ignore
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue