From f049d8c223f6c9788e2593c64a7b3ae65b1a858d Mon Sep 17 00:00:00 2001 From: yetuge <2219677952@qq.com> Date: Wed, 23 Sep 2026 07:06:05 +0800 Subject: [PATCH] docs: fix stale ttl entry in RedisSemanticCache docstring MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `__init__` docstring documents a `ttl` argument, but the constructor has no such parameter — the TTL is read per lookup from `**kwargs` by `_get_ttl`. Fold the TTL note into the `**kwargs` entry instead of implying a constructor parameter. Documentation only; no behavior change. --- litellm/caching/redis_semantic_cache.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/litellm/caching/redis_semantic_cache.py b/litellm/caching/redis_semantic_cache.py index d4c815e15b7..d29ca7dde04 100644 --- a/litellm/caching/redis_semantic_cache.py +++ b/litellm/caching/redis_semantic_cache.py @@ -81,8 +81,9 @@ class RedisSemanticCache(BaseCache): embedding; defaults to the Router deployment's configured max_input_tokens embedding_timeout: Seconds a cache lookup may spend embedding the prompt before it gives up and lets the request continue to the LLM - ttl: Default time-to-live for cache entries in seconds - **kwargs: Additional arguments passed to the Redis client + **kwargs: Additional arguments passed to the Redis client. A `ttl` key sets + the default time-to-live for cache entries in seconds; it is read per + lookup by _get_ttl, not forwarded to the Redis client Raises: Exception: If similarity_threshold is not provided or required Redis