pub trait ObjectCache<K, V>: Send + Sync {
// Required methods
fn get(&self, key: &K) -> Option<V>;
fn set(&self, key: K, value: V);
}
Expand description
A trait for caching in-memory objects of given type.
§Notes
ObjectCache will store deeply nested objects, such as Manifest
,
which contains Schema
. Please ensure that the cache stores the
object in memory as-is, without attempting to serialize it, as
serialization could be extremely expensive.