pub trait MapCache: Send + Sync {
// Required methods
fn get(&self, key: &str) -> Option<Arc<TokenizerMap>>;
fn set(&self, key: &str, map: Arc<TokenizerMap>);
}Expand description
Pluggable cache for loaded maps. The default is MemoryMapCache.
Implement this trait to plug in IndexedDB, Redis, on-disk storage, etc.
Required Methods§
Sourcefn set(&self, key: &str, map: Arc<TokenizerMap>)
fn set(&self, key: &str, map: Arc<TokenizerMap>)
Stores map under key.