forked from phoenix/litellm-mirror
fix(redis.py): fix instantiating redis client from url
This commit is contained in:
parent
ad2deac958
commit
66c7e35a97
2 changed files with 10 additions and 2 deletions
|
@ -134,10 +134,12 @@ class RedisCache(BaseCache):
|
|||
f"Set ASYNC Redis Cache: key: {key}\nValue {value}\nttl={ttl}"
|
||||
)
|
||||
try:
|
||||
await redis_client.set(name=key, value=json.dumps(value), ex=ttl)
|
||||
await redis_client.set(
|
||||
name=key, value=json.dumps(value), ex=ttl, get=True
|
||||
)
|
||||
except Exception as e:
|
||||
# NON blocking - notify users Redis is throwing an exception
|
||||
logging.debug("LiteLLM Caching: set() - Got exception from REDIS : ", e)
|
||||
print_verbose("LiteLLM Caching: set() - Got exception from REDIS : ", e)
|
||||
|
||||
async def async_set_cache_pipeline(self, cache_list, ttl=None):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue