mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-15 12:27:01 +00:00
docs(caching.md): remove batch redis get recommendation - old code path, no longer necessary
This commit is contained in:
@@ -894,33 +894,6 @@ curl http://localhost:4000/v1/chat/completions \
|
||||
|
||||
</Tabs>
|
||||
|
||||
|
||||
|
||||
### Turn on `batch_redis_requests`
|
||||
|
||||
**What it does?**
|
||||
When a request is made:
|
||||
|
||||
- Check if a key starting with `litellm:<hashed_api_key>:<call_type>:` exists in-memory, if no - get the last 100 cached requests for this key and store it
|
||||
|
||||
- New requests are stored with this `litellm:..` as the namespace
|
||||
|
||||
**Why?**
|
||||
Reduce number of redis GET requests. This improved latency by 46% in prod load tests.
|
||||
|
||||
**Usage**
|
||||
|
||||
```yaml
|
||||
litellm_settings:
|
||||
cache: true
|
||||
cache_params:
|
||||
type: redis
|
||||
... # remaining redis args (host, port, etc.)
|
||||
callbacks: ["batch_redis_requests"] # 👈 KEY CHANGE!
|
||||
```
|
||||
|
||||
[**SEE CODE**](https://github.com/BerriAI/litellm/blob/main/litellm/proxy/hooks/batch_redis_get.py)
|
||||
|
||||
## Supported `cache_params` on proxy config.yaml
|
||||
|
||||
```yaml
|
||||
|
||||
Reference in New Issue
Block a user