pub trait CacheableTool: Tool {
// Required method
fn cache_key(&self, args: &Value) -> String;
// Provided methods
fn should_cache(&self, _args: &Value) -> bool { ... }
fn cache_ttl(&self) -> u64 { ... }
}
Expand description
Trait for caching tool results
Required Methods§
Provided Methods§
Sourcefn should_cache(&self, _args: &Value) -> bool
fn should_cache(&self, _args: &Value) -> bool
Check if result should be cached