litellm/litellm/caching
Ryan Crabbe 68a30a39e6 fix(proxy): add LPOP pipeline error checking and fix org spend ServiceType
- Add per-command error check in _pipeline_lpop_helper to match _pipeline_rpush_helper, preventing silent data loss on WRONGTYPE errors
- Fix pre-existing bug: org spend queue metric was using REDIS_DAILY_SPEND_UPDATE_QUEUE instead of REDIS_DAILY_ORG_SPEND_UPDATE_QUEUE
- Add test for per-command LPOP pipeline error propagation
2026-02-24 14:22:57 -08:00
..
__init__.py
_internal_lru_cache.py
azure_blob_cache.py
base_cache.py
caching_handler.py Add support for caching for responses API 2026-01-14 13:33:07 +05:30
caching.py feat(semantic-cache): support configurable vector dimensions for Qdrant (#21649) 2026-02-21 00:51:15 -08:00
disk_cache.py
dual_cache.py fix(cache): prevent DualCache async batch check-then-act race (#20986) 2026-02-13 18:32:41 +05:30
gcs_cache.py
in_memory_cache.py
llm_caching_handler.py fix: also close sync clients on eviction from LLMClientCache 2026-02-20 17:36:28 -08:00
qdrant_semantic_cache.py feat(semantic-cache): support configurable vector dimensions for Qdrant (#21649) 2026-02-21 00:51:15 -08:00
Readme.md
redis_cache.py fix(proxy): add LPOP pipeline error checking and fix org spend ServiceType 2026-02-24 14:22:57 -08:00
redis_cluster_cache.py fix(mypy): resolve type checking errors in 5 files (#20627) 2026-02-06 18:34:55 -08:00
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:

  1. RedisCache
  2. RedisSemanticCache
  3. QdrantSemanticCache
  4. InMemoryCache
  5. DiskCache
  6. S3Cache
  7. AzureBlobCache
  8. 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

Documentation