pub struct ProjectManagerCache { /* private fields */ }
Expand description
In-memory cache for project manager data
Implementations§
Source§impl ProjectManagerCache
impl ProjectManagerCache
Sourcepub fn cache_project(&self, name: &str, project: Project)
pub fn cache_project(&self, name: &str, project: Project)
Cache a project with default TTL of 5 minutes
Sourcepub fn cache_project_with_ttl(
&self,
name: &str,
project: Project,
ttl: Duration,
)
pub fn cache_project_with_ttl( &self, name: &str, project: Project, ttl: Duration, )
Cache a project with custom TTL
Sourcepub fn get_project(&self, name: &str) -> Option<Project>
pub fn get_project(&self, name: &str) -> Option<Project>
Get a cached project if not expired
Sourcepub fn cache_specification(&self, key: &str, spec: Specification)
pub fn cache_specification(&self, key: &str, spec: Specification)
Cache a specification with default TTL of 10 minutes
Sourcepub fn cache_specification_with_ttl(
&self,
key: &str,
spec: Specification,
ttl: Duration,
)
pub fn cache_specification_with_ttl( &self, key: &str, spec: Specification, ttl: Duration, )
Cache a specification with custom TTL
Sourcepub fn get_specification(&self, key: &str) -> Option<Specification>
pub fn get_specification(&self, key: &str) -> Option<Specification>
Get a cached specification if not expired
Sourcepub fn cache_project_list(&self, key: &str, projects: Vec<String>)
pub fn cache_project_list(&self, key: &str, projects: Vec<String>)
Cache a project list with default TTL of 2 minutes
Sourcepub fn cache_project_list_with_ttl(
&self,
key: &str,
projects: Vec<String>,
ttl: Duration,
)
pub fn cache_project_list_with_ttl( &self, key: &str, projects: Vec<String>, ttl: Duration, )
Cache a project list with custom TTL
Sourcepub fn get_project_list(&self, key: &str) -> Option<Vec<String>>
pub fn get_project_list(&self, key: &str) -> Option<Vec<String>>
Get a cached project list if not expired
Sourcepub fn cache_spec_list(&self, key: &str, specs: Vec<String>)
pub fn cache_spec_list(&self, key: &str, specs: Vec<String>)
Cache a spec list with default TTL of 5 minutes
Sourcepub fn cache_spec_list_with_ttl(
&self,
key: &str,
specs: Vec<String>,
ttl: Duration,
)
pub fn cache_spec_list_with_ttl( &self, key: &str, specs: Vec<String>, ttl: Duration, )
Cache a spec list with custom TTL
Sourcepub fn get_spec_list(&self, key: &str) -> Option<Vec<String>>
pub fn get_spec_list(&self, key: &str) -> Option<Vec<String>>
Get a cached spec list if not expired
Sourcepub fn cache_file_content(&self, path: &str, content: String)
pub fn cache_file_content(&self, path: &str, content: String)
Cache file contents with default TTL of 1 minute
Sourcepub fn cache_file_content_with_ttl(
&self,
path: &str,
content: String,
ttl: Duration,
)
pub fn cache_file_content_with_ttl( &self, path: &str, content: String, ttl: Duration, )
Cache file contents with custom TTL
Sourcepub fn get_file_content(&self, path: &str) -> Option<String>
pub fn get_file_content(&self, path: &str) -> Option<String>
Get cached file contents if not expired
Sourcepub fn invalidate_project(&self, project_name: &str)
pub fn invalidate_project(&self, project_name: &str)
Invalidate all cached data for a specific project
Sourcepub fn invalidate_specification(&self, project_name: &str, spec_id: &str)
pub fn invalidate_specification(&self, project_name: &str, spec_id: &str)
Invalidate all cached data for a specific specification
Sourcepub fn cleanup_expired(&self)
pub fn cleanup_expired(&self)
Clear all expired entries
Sourcepub fn stats(&self) -> CacheStats
pub fn stats(&self) -> CacheStats
Get cache statistics
Trait Implementations§
Source§impl Clone for ProjectManagerCache
impl Clone for ProjectManagerCache
Source§fn clone(&self) -> ProjectManagerCache
fn clone(&self) -> ProjectManagerCache
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more