Quick Start
Cache Methods
Vector Search (Default)
Uses semantic similarity to find cached responses for similar inputs.LLM Call
Uses an LLM to determine if cached responses are applicable.Configuration Options
Full Example
Task Cache Methods
get_cache_stats()
Get cache statistics including hit rate and configuration.total_entries: Number of cached entriescache_hits: Number of cache hitscache_misses: Number of cache misseshit_rate: Cache hit rate (0.0-1.0)cache_method: Current cache methodcache_threshold: Current thresholdcache_hit: Whether last request was a cache hitsession_id: Current session ID
clear_cache()
Clear all cache entries.Best Practices
- Threshold Tuning: Start with
0.7, increase for stricter matching - Duration: Set based on how often your data changes
- Method Choice: Use
vector_searchfor speed,llm_callfor accuracy - Embedding Provider: Auto-detected if not specified

