pub struct RepositoryCache { /* private fields */ }Expand description
Fast SQLite-based cache for repository metadata
Implementations§
Source§impl RepositoryCache
impl RepositoryCache
Sourcepub async fn initialize(&self) -> Result<()>
pub async fn initialize(&self) -> Result<()>
Initialize the cache database with required tables
Sourcepub async fn cache_repository(&self, repo: &CachedRepository) -> Result<()>
pub async fn cache_repository(&self, repo: &CachedRepository) -> Result<()>
Cache repository information
Sourcepub async fn get_repository(
&self,
name: &str,
) -> Result<Option<CachedRepository>>
pub async fn get_repository( &self, name: &str, ) -> Result<Option<CachedRepository>>
Get cached repository by name
Sourcepub async fn get_repositories_with_apps(&self) -> Result<Vec<CachedRepository>>
pub async fn get_repositories_with_apps(&self) -> Result<Vec<CachedRepository>>
Get all repositories with configured apps (for launch UI)
Sourcepub async fn refresh_from_config(
&self,
repositories: &[Repository],
workspace_root: &Path,
) -> Result<()>
pub async fn refresh_from_config( &self, repositories: &[Repository], workspace_root: &Path, ) -> Result<()>
Update cache for all repositories in workspace config
Sourcepub async fn cleanup_stale_entries(
&self,
current_repo_names: &[String],
) -> Result<()>
pub async fn cleanup_stale_entries( &self, current_repo_names: &[String], ) -> Result<()>
Remove repositories that no longer exist in config
Sourcepub async fn get_stats(&self) -> Result<CacheStats>
pub async fn get_stats(&self) -> Result<CacheStats>
Get cache statistics
Auto Trait Implementations§
impl Freeze for RepositoryCache
impl RefUnwindSafe for RepositoryCache
impl Send for RepositoryCache
impl Sync for RepositoryCache
impl Unpin for RepositoryCache
impl UnsafeUnpin for RepositoryCache
impl UnwindSafe for RepositoryCache
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