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 eb325cce7d
commit 7500855654
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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