From 16ade7e5568d367ba1e12dc45302902d7a7e891d Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Mon, 25 Mar 2024 13:46:52 -0700 Subject: [PATCH] docs(proxy/caching.md): add ttl param to proxy/caching.md --- docs/my-website/docs/proxy/caching.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/my-website/docs/proxy/caching.md b/docs/my-website/docs/proxy/caching.md index cadda0fdf8d..ccc2ae24178 100644 --- a/docs/my-website/docs/proxy/caching.md +++ b/docs/my-website/docs/proxy/caching.md @@ -32,8 +32,9 @@ litellm_settings: cache: True # set cache responses to True, litellm defaults to using a redis cache ``` -#### [OPTIONAL] Step 1.5: Add redis namespaces +#### [OPTIONAL] Step 1.5: Add redis namespaces, default ttl +## Namespace If you want to create some folder for your keys, you can set a namespace, like this: ```yaml @@ -50,6 +51,16 @@ and keys will be stored like: litellm_caching: ``` +## TTL + +```yaml +litellm_settings: + cache: true + cache_params: # set cache params for redis + type: redis + ttl: 600 # will be cached on redis for 600s +``` + #### Step 2: Add Redis Credentials to .env Set either `REDIS_URL` or the `REDIS_HOST` in your os environment, to enable caching.