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