From c3beaedaa68a79e59528081dc0faf3edeba8b837 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Tue, 4 Feb 2025 11:34:38 -0800 Subject: [PATCH] chore: remove CACHE logic from sendchat and models files --- aider/models.py | 7 +------ aider/sendchat.py | 6 ------ 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/aider/models.py b/aider/models.py index e25dd2694..de6e89ecd 100644 --- a/aider/models.py +++ b/aider/models.py @@ -551,13 +551,8 @@ class Model(ModelSettings): key = json.dumps(kwargs, sort_keys=True).encode() # dump(kwargs) hash_object = hashlib.sha1(key) - from aider.sendchat import CACHE, litellm - - if not stream and CACHE is not None and key in CACHE: - return hash_object, CACHE[key] + from aider.sendchat import litellm res = litellm.completion(**kwargs) - if not stream and CACHE is not None: - CACHE[key] = res return hash_object, res def simple_send_with_retries(self, messages): diff --git a/aider/sendchat.py b/aider/sendchat.py index f518a6d70..1710a4e92 100644 --- a/aider/sendchat.py +++ b/aider/sendchat.py @@ -1,12 +1,6 @@ from aider.dump import dump # noqa: F401 from aider.utils import format_messages -# from diskcache import Cache - - -CACHE_PATH = "~/.aider.send.cache.v1" -CACHE = None -# CACHE = Cache(CACHE_PATH) RETRY_TIMEOUT = 60