From 9a23317461225844a067d2ffeb33993c24e701a9 Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Thu, 8 Feb 2024 10:01:56 -0800 Subject: [PATCH] (feat) fix s3 cache --- litellm/utils.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/litellm/utils.py b/litellm/utils.py index ad56fd576..feb952dbd 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -2786,6 +2786,12 @@ def client(original_function): result, *args, **kwargs ) ) + elif isinstance(litellm.cache.cache, S3Cache): + threading.Thread( + target=litellm.cache.add_cache, + args=(result,) + args, + kwargs=kwargs, + ).start() else: asyncio.create_task( litellm.cache.async_add_cache(