pub struct Cache { /* private fields */ }
Expand description
Cache struct to manage cache operations
Implementations§
Source§impl Cache
impl Cache
Sourcepub fn store_raw(&self, filename: &str, data: &str) -> Result<()>
pub fn store_raw(&self, filename: &str, data: &str) -> Result<()>
Stores raw string data in the cache
Sourcepub fn is_cache_valid(&self, filename: &str) -> Result<bool>
pub fn is_cache_valid(&self, filename: &str) -> Result<bool>
Checks if a cache file exists and is valid (within TTL)
Sourcepub fn clear_file(&self, filename: &str) -> Result<()>
pub fn clear_file(&self, filename: &str) -> Result<()>
Clears a specific cache file
Auto Trait Implementations§
impl Freeze for Cache
impl RefUnwindSafe for Cache
impl Send for Cache
impl Sync for Cache
impl Unpin for Cache
impl UnwindSafe for Cache
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