pub struct InsightCache { /* private fields */ }Expand description
Cache for file insights based on BLAKE3 content hashes Implements R3.4: reuse cached core insights based on BLAKE3 keys
Implementations§
Source§impl InsightCache
impl InsightCache
Sourcepub fn new(cache_dir: Utf8PathBuf) -> Result<Self>
pub fn new(cache_dir: Utf8PathBuf) -> Result<Self>
Create a new insight cache with the specified cache directory
Sourcepub const fn stats(&self) -> &CacheStats
pub const fn stats(&self) -> &CacheStats
Get cache statistics for verbose logging
Sourcepub fn get_insights(
&mut self,
file_path: &Utf8Path,
content_hash: &str,
phase: &str,
logger: Option<&Logger>,
) -> Result<Option<Vec<String>>>
pub fn get_insights( &mut self, file_path: &Utf8Path, content_hash: &str, phase: &str, logger: Option<&Logger>, ) -> Result<Option<Vec<String>>>
Get cached insights for a file, or None if not cached or invalid
Sourcepub fn store_insights(
&mut self,
file_path: &Utf8Path,
_content: &str,
content_hash: &str,
phase: &str,
priority: Priority,
insights: Vec<String>,
logger: Option<&Logger>,
) -> Result<()>
pub fn store_insights( &mut self, file_path: &Utf8Path, _content: &str, content_hash: &str, phase: &str, priority: Priority, insights: Vec<String>, logger: Option<&Logger>, ) -> Result<()>
Store insights in cache for a file
Trait Implementations§
Auto Trait Implementations§
impl Freeze for InsightCache
impl RefUnwindSafe for InsightCache
impl Send for InsightCache
impl Sync for InsightCache
impl Unpin for InsightCache
impl UnsafeUnpin for InsightCache
impl UnwindSafe for InsightCache
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