fix redis async_set_cache_pipeline when empty list passed to it (#5962)

This commit is contained in:
Ishaan Jaff 2024-09-28 13:32:00 -07:00 committed by GitHub
parent 80a988c459
commit 432c3f18ae

View file

@ -461,6 +461,9 @@ class RedisCache(BaseCache):
"""
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
_redis_client: Redis = self.init_async_client() # type: ignore