pub struct AdmissionFilter {
pub ghost_mask: usize,
pub ghost_set: Arc<[AtomicU16]>,
}Expand description
Ghost Set: direct-mapped fingerprint array. Records the 16-bit fingerprint of evicted items so that previously-hot items can be resurrected immediately on re-insert, bypassing TLS probation.
Fields§
§ghost_mask: usize§ghost_set: Arc<[AtomicU16]>Implementations§
Source§impl AdmissionFilter
impl AdmissionFilter
pub fn new(capacity: usize) -> Self
Sourcepub fn record_death(&self, hash: u64)
pub fn record_death(&self, hash: u64)
Called by Daemon on eviction: record this item’s fingerprint.
Sourcepub fn check_ghost(&self, hash: u64) -> bool
pub fn check_ghost(&self, hash: u64) -> bool
Called by Frontend Worker on insert: true if this item was previously evicted. Fast-path: skips TLS probation and sends directly to Daemon.
pub fn clear(&self)
Auto Trait Implementations§
impl Freeze for AdmissionFilter
impl RefUnwindSafe for AdmissionFilter
impl Send for AdmissionFilter
impl Sync for AdmissionFilter
impl Unpin for AdmissionFilter
impl UnsafeUnpin for AdmissionFilter
impl UnwindSafe for AdmissionFilter
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