pub struct SymbolTableCache { /* private fields */ }Expand description
A specialized cache for symbol table queries.
Implementations§
Source§impl SymbolTableCache
impl SymbolTableCache
Sourcepub fn with_config(config: CacheConfig) -> Self
pub fn with_config(config: CacheConfig) -> Self
Create a new cache with custom configuration.
Sourcepub fn get_predicates_by_arity(
&mut self,
table: &SymbolTable,
arity: usize,
) -> Vec<PredicateInfo>
pub fn get_predicates_by_arity( &mut self, table: &SymbolTable, arity: usize, ) -> Vec<PredicateInfo>
Get predicates by arity (cached).
Sourcepub fn get_predicates_by_domain(
&mut self,
table: &SymbolTable,
domain: &str,
) -> Vec<PredicateInfo>
pub fn get_predicates_by_domain( &mut self, table: &SymbolTable, domain: &str, ) -> Vec<PredicateInfo>
Get predicates using a domain (cached).
Sourcepub fn get_domain_names(&mut self, table: &SymbolTable) -> Vec<String>
pub fn get_domain_names(&mut self, table: &SymbolTable) -> Vec<String>
Get all domain names (cached).
Sourcepub fn get_domain_usage_count(
&mut self,
table: &SymbolTable,
domain: &str,
) -> usize
pub fn get_domain_usage_count( &mut self, table: &SymbolTable, domain: &str, ) -> usize
Get domain usage count (cached).
Sourcepub fn invalidate_all(&mut self)
pub fn invalidate_all(&mut self)
Invalidate all caches.
Sourcepub fn invalidate_domain(&mut self, domain: &str)
pub fn invalidate_domain(&mut self, domain: &str)
Invalidate caches related to a specific domain.
Sourcepub fn invalidate_predicates(&mut self)
pub fn invalidate_predicates(&mut self)
Invalidate caches related to predicates.
Sourcepub fn combined_stats(&self) -> QueryCacheStats
pub fn combined_stats(&self) -> QueryCacheStats
Get combined statistics from all caches.
Sourcepub fn cleanup_expired(&mut self) -> usize
pub fn cleanup_expired(&mut self) -> usize
Cleanup expired entries in all caches.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SymbolTableCache
impl RefUnwindSafe for SymbolTableCache
impl Send for SymbolTableCache
impl Sync for SymbolTableCache
impl Unpin for SymbolTableCache
impl UnwindSafe for SymbolTableCache
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more