commit b12a9892b750f6f838b1049110626261732c8804
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date: Wed Apr 2 08:09:56 2025 -0700
fix(utils.py): don't modify openai_token_counter
commit 294de3180391f4bb36dcf3ffdd80a0cd387003eb
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date: Mon Mar 24 21:22:40 2025 -0700
fix: fix linting error
commit cb6e9fbe402dacfde36d9d28f872483818ac1f12
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date: Mon Mar 24 19:52:45 2025 -0700
refactor: complete migration
commit bfc159172dbfffcd9fee47153c554a59cc2758c7
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date: Mon Mar 24 19:09:59 2025 -0700
refactor: refactor more constants
commit 43ffb6a5583cc3da927042c158ff543af552d2ac
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date: Mon Mar 24 18:45:24 2025 -0700
fix: test
commit 04dbe4310cd588c326194e8e36a0a31cdf0e61fc
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date: Mon Mar 24 18:28:58 2025 -0700
refactor: refactor: move more constants into constants.py
commit 3c26284affeffcec6dd904fdb7ecd3a3d5724660
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date: Mon Mar 24 18:14:46 2025 -0700
refactor: migrate hardcoded constants out of __init__.py
commit c11e0de69d13f6a97ffed5733cf6008fcdd8e0ee
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date: Mon Mar 24 18:11:21 2025 -0700
build: migrate all constants into constants.py
commit 7882bdc787b21e8e0b1800dd5c1180bbe808d228
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date: Mon Mar 24 18:07:37 2025 -0700
build: initial test banning hardcoded numbers in repo
|
||
|---|---|---|
| .. | ||
| __init__.py | ||
| _internal_lru_cache.py | ||
| base_cache.py | ||
| caching_handler.py | ||
| caching.py | ||
| disk_cache.py | ||
| dual_cache.py | ||
| in_memory_cache.py | ||
| llm_caching_handler.py | ||
| qdrant_semantic_cache.py | ||
| Readme.md | ||
| redis_cache.py | ||
| redis_cluster_cache.py | ||
| redis_semantic_cache.py | ||
| s3_cache.py | ||
Caching on LiteLLM
LiteLLM supports multiple caching mechanisms. This allows users to choose the most suitable caching solution for their use case.
The following caching mechanisms are supported:
- RedisCache
- RedisSemanticCache
- QdrantSemanticCache
- InMemoryCache
- DiskCache
- S3Cache
- DualCache (updates both Redis and an in-memory cache simultaneously)
Folder Structure
litellm/caching/
├── base_cache.py
├── caching.py
├── caching_handler.py
├── disk_cache.py
├── dual_cache.py
├── in_memory_cache.py
├── qdrant_semantic_cache.py
├── redis_cache.py
├── redis_semantic_cache.py
├── s3_cache.py