pub struct CacheObject { /* private fields */ }Expand description
Represents an individual cache object with file operations
Implementations§
Source§impl CacheObject
impl CacheObject
Sourcepub fn created_at(&self) -> SystemTime
pub fn created_at(&self) -> SystemTime
Sourcepub fn get_string(&self) -> Result<String>
pub fn get_string(&self) -> Result<String>
Reads and returns the entire cache content as string
§Returns
io::Result<String> - Cache content or error
Sourcepub fn write_string(&self, content: &str) -> Result<()>
pub fn write_string(&self, content: &str) -> Result<()>
Sourcepub fn is_expired(&self) -> bool
👎Deprecated: This enumeration has been deprecated due to issues, and it now only returns false
pub fn is_expired(&self) -> bool
Checks if the cache has expired based on its lifecycle policy
§Returns
bool - True if expired, false otherwise
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CacheObject
impl RefUnwindSafe for CacheObject
impl Send for CacheObject
impl Sync for CacheObject
impl Unpin for CacheObject
impl UnwindSafe for CacheObject
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