pub trait Cache: Send + Sync { // Required methods fn get(&self, prompt: &str) -> Option<String>; fn set(&self, prompt: &str, response: String); }
Trait for prompt caching strategies.
Try to retrieve a cached response for a prompt.
Store a response in the cache.