pub struct Lfu {
pub log_factor: u32,
pub decay_minutes: u32,
}Expand description
The two knobs an LFU policy has, which are lfu-log-factor and
lfu-decay-time.
They travel together because neither means anything on its own. The factor decides how many accesses it takes to climb and the decay decides how fast the climb is given back, so it is the pair that sets what the counter measures, and passing one without the other is how they drift apart.
Fields§
§log_factor: u32How sharply the counter’s growth flattens out. See LFU_LOG_FACTOR.
decay_minutes: u32Minutes of quiet per step down. See LFU_DECAY_MINUTES.
Implementations§
Trait Implementations§
impl Copy for Lfu
impl Eq for Lfu
impl StructuralPartialEq for Lfu
Auto Trait Implementations§
impl Freeze for Lfu
impl RefUnwindSafe for Lfu
impl Send for Lfu
impl Sync for Lfu
impl Unpin for Lfu
impl UnsafeUnpin for Lfu
impl UnwindSafe for Lfu
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