From f387fba8da908c802c9721e6c310cfd726c702d1 Mon Sep 17 00:00:00 2001 From: PRABHU KIRAN VANDRANKI <72809214+VANDRANKI@users.noreply.github.com> Date: Sat, 18 Apr 2026 13:27:13 -0400 Subject: [PATCH] fix: reset TTL globals on cache init failure in except block --- litellm/proxy/proxy_server.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py index 1ad27934cc9..5d1305b4186 100644 --- a/litellm/proxy/proxy_server.py +++ b/litellm/proxy/proxy_server.py @@ -3145,6 +3145,8 @@ class ProxyConfig: "Fix your cache configuration and restart the proxy to enable caching." ) litellm.cache = None + litellm.default_in_memory_ttl = None + litellm.default_redis_ttl = None elif key == "cache" and value is False: pass elif key == "guardrails":