mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
docs(proxy/caching.md): add ttl param to proxy/caching.md
This commit is contained in:
parent
591a0a376e
commit
16ade7e556
1 changed files with 12 additions and 1 deletions
|
|
@ -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:<hash>
|
||||
```
|
||||
|
||||
## 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.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue