docs: fix stale ttl entry in RedisSemanticCache docstring

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.
This commit is contained in:
yetuge 2026-09-23 07:06:05 +08:00
parent 392e807172
commit f049d8c223

View file

@ -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