common_meta::cache

Type Alias TableRouteCache

source
pub type TableRouteCache = CacheContainer<TableId, Arc<TableRoute>, CacheIdent>;
Expand description

TableRouteCache caches the [TableId] to TableRoute mapping.

Aliased Type§

struct TableRouteCache {
    name: String,
    cache: Cache<u32, Arc<TableRoute>>,
    invalidator: Box<dyn for<'a> Fn(&'a Cache<u32, Arc<TableRoute>>, &'a CacheIdent) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a>> + Send + Sync>,
    initializer: Arc<dyn Fn(&u32) -> Pin<Box<dyn Future<Output = Result<Option<Arc<TableRoute>>, Error>> + Send + '_>> + Send + Sync>,
    token_filter: Box<dyn Fn(&CacheIdent) -> bool + Send + Sync>,
}

Fields§

§name: String§cache: Cache<u32, Arc<TableRoute>>§invalidator: Box<dyn for<'a> Fn(&'a Cache<u32, Arc<TableRoute>>, &'a CacheIdent) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a>> + Send + Sync>§initializer: Arc<dyn Fn(&u32) -> Pin<Box<dyn Future<Output = Result<Option<Arc<TableRoute>>, Error>> + Send + '_>> + Send + Sync>§token_filter: Box<dyn Fn(&CacheIdent) -> bool + Send + Sync>