Quick Start
Configuration Options
| Parameter | Type | Default | Description |
|---|---|---|---|
enabled | bool | True | Enable response caching |
prompt_caching | bool | None | None | Enable prompt caching (auto-detect via litellm.utils.supports_prompt_caching) |
Common Patterns
Pattern 1: Full Caching
Pattern 2: Auto-Detection with Memory
Even without explicitprompt_caching=True, the SDK auto-detects model support and arranges the prefix accordingly:
Pattern 3: Disable Caching
Best Practices
Enable Prompt Caching for Anthropic
Enable Prompt Caching for Anthropic
Anthropic Claude supports prompt caching for significant cost savings on repeated prompts.
Disable for Real-Time Data
Disable for Real-Time Data
Turn off caching when agents need fresh, real-time information.
Related
Performance
Performance optimization tips
ExecutionConfig
Execution limits configuration

