mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-25 10:26:44 +00:00
[Reset Code]
This commit is contained in:
+2
-3
@@ -374,11 +374,10 @@ class RedisCache(BaseCache):
|
||||
f"Set ASYNC Redis Cache PIPELINE: key: {cache_key}\nValue {cache_value}\nttl={ttl}"
|
||||
)
|
||||
# Set the value with a TTL if it's provided.
|
||||
json_cache_value = json.dumps(cache_value)
|
||||
if ttl is not None:
|
||||
pipe.setex(cache_key, ttl, json_cache_value)
|
||||
pipe.setex(cache_key, ttl, json.dumps(cache_value))
|
||||
else:
|
||||
pipe.set(cache_key, json_cache_value)
|
||||
pipe.set(cache_key, json.dumps(cache_value))
|
||||
# Execute the pipeline and return the results.
|
||||
results = await pipe.execute()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user