pub struct CachedResult {
pub result: Arc<Vec<JsonbValue>>,
pub accessed_views: Vec<String>,
pub cached_at: u64,
pub hit_count: u64,
}Expand description
Cached query result with metadata.
Stores the query result along with tracking information for TTL expiry, view-based invalidation, and monitoring.
Fields§
§result: Arc<Vec<JsonbValue>>The actual query result (JSONB array from database).
Wrapped in Arc for cheap cloning on cache hits (zero-copy).
accessed_views: Vec<String>Which views/tables this query accesses.
Format: vec!["v_user", "v_post"]
Used for view-based invalidation when mutations modify these views.
cached_at: u64When this entry was cached (Unix timestamp in seconds).
Used for TTL expiry check on access.
hit_count: u64Number of cache hits for this entry.
Used for monitoring and optimization. Incremented on each get().
Trait Implementations§
Source§impl Clone for CachedResult
impl Clone for CachedResult
Source§fn clone(&self) -> CachedResult
fn clone(&self) -> CachedResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CachedResult
impl RefUnwindSafe for CachedResult
impl Send for CachedResult
impl Sync for CachedResult
impl Unpin for CachedResult
impl UnsafeUnpin for CachedResult
impl UnwindSafe for CachedResult
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