pub trait ResponseCache: Send + Sync {
// Required methods
fn get(&self, key: &str) -> Option<String>;
fn put(&self, key: String, value: String);
fn clear(&self);
}Expand description
LLM result cache abstraction.
Values are carried as strings (internally a serialized AgentOutput); the
implementation can be swapped for disk / Redis / cross-process sharing as
long as get/put semantics stay consistent.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".