Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

Add documentation on in-memory and disk caching (#10522)

user202729044f5f973b0c
diff --git a/docs/my-website/docs/proxy/caching.md b/docs/my-website/docs/proxy/caching.md
index b60b9966ba2..84e8c5f8d58 100644
--- a/docs/my-website/docs/proxy/caching.md
+++ b/docs/my-website/docs/proxy/caching.md
@@ -16,6 +16,7 @@ Cache LLM Responses. LiteLLM's caching system stores and reuses LLM responses to
### Supported Caches
- In Memory Cache
+- Disk Cache
- Redis Cache
- Qdrant Semantic Cache
- Redis Semantic Cache
@@ -338,7 +339,7 @@ model_list:
litellm_settings:
set_verbose: True
- cache: True # set cache responses to True, litellm defaults to using a redis cache
+ cache: True # set cache responses to True
cache_params:
type: "redis-semantic"
similarity_threshold: 0.8 # similarity threshold for semantic cache
@@ -369,6 +370,40 @@ $ litellm --config /path/to/config.yaml
</TabItem>
+<TabItem value="local" label="In Memory Cache">
+
+#### Step 1: Add `cache` to the config.yaml
+```yaml
+litellm_settings:
+ cache: True
+ cache_params:
+ type: local
+```
+
+#### Step 2: Run proxy with config
+```shell
+$ litellm --config /path/to/config.yaml
+```
+
+</TabItem>
+
+<TabItem value="disk" label="Disk Cache">
+
+#### Step 1: Add `cache` to the config.yaml
+```yaml
+litellm_settings:
+ cache: True
+ cache_params:
+ type: disk
+ disk_cache_dir: /tmp/litellm-cache # OPTIONAL, default to ./.litellm_cache
+```
+
+#### Step 2: Run proxy with config
+```shell
+$ litellm --config /path/to/config.yaml
+```
+
+</TabItem>
</Tabs>
@@ -932,4 +967,4 @@ general_settings:
user_api_key_cache_ttl: <your-number> #time in seconds
```
-By default this value is set to 60s.
\ No newline at end of file
+By default this value is set to 60s.