pub struct CachedValue {
pub value: Vec<u8>,
pub content_type: String,
pub created_at: i64,
pub accessed_at: i64,
pub access_count: u32,
pub ttl_secs: Option<u64>,
}Expand description
A returned cache hit. accessed_at / access_count are updated on
the directory before this is constructed, so the values here
reflect the post-touch state (mirroring the recall-time convention).
Fields§
§value: Vec<u8>Value bytes as stored by cache_put.
content_type: StringContent-type label as stored by cache_put.
created_at: i64Unix seconds when this entry was created.
accessed_at: i64Unix seconds when this entry was last accessed (this hit).
access_count: u32Number of hits recorded on this entry (including the current one).
ttl_secs: Option<u64>TTL configured on cache_put, if any.
Trait Implementations§
Source§impl Clone for CachedValue
impl Clone for CachedValue
Auto Trait Implementations§
impl Forget for CachedValue
impl Freeze for CachedValue
impl RefUnwindSafe for CachedValue
impl Send for CachedValue
impl Sync for CachedValue
impl Unpin for CachedValue
impl UnsafeUnpin for CachedValue
impl UnwindSafe for CachedValue
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