From bf4a9f40e88dbc41b977d924eea803679e0e79c0 Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Sat, 30 Dec 2023 19:50:22 +0530 Subject: [PATCH] (docs) cache context manager --- docs/my-website/docs/caching/redis_cache.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/my-website/docs/caching/redis_cache.md b/docs/my-website/docs/caching/redis_cache.md index cbe8c5b10..fc799bcc3 100644 --- a/docs/my-website/docs/caching/redis_cache.md +++ b/docs/my-website/docs/caching/redis_cache.md @@ -60,6 +60,23 @@ Switch caching off litellm.disable_cache() ``` +### Updating Cache Params (Redis Host, Port etc) + +Update the Cache params + +```python +litellm.update_cache( + type: Optional[Literal["local", "redis"]] = "local", + host: Optional[str] = None, + port: Optional[str] = None, + password: Optional[str] = None, + supported_call_types: Optional[ + List[Literal["completion", "acompletion", "embedding", "aembedding"]] + ] = ["completion", "acompletion", "embedding", "aembedding"], + **kwargs, +) +``` + ## Custom Cache Keys: Define function to return cache key ```python