pub fn new(mem_len: usize) -> Self {
        // Just make it work if an invalid value is thrown in
        let mem_len = mem_len.clamp(2, u32::MAX as usize);

        Self {
            map: HashMap::new(),
            list: VecDeque::with_capacity(mem_len),
            mem_len,
            size: 0,
            hits: 0,
            misses: 0,
        }
    }
/// Create and initialize a new cache.
Create and initialize a new cache.
Create and initialize a new cache .
pub fn new(mem_len: usize) -> Self {
        // Just make it work if an invalid value is thrown in
        let mem_len = mem_len.clamp(2, u32::MAX as usize);
        Self {
            map: HashMap::new(),
            list: VecDeque::with_capacity(mem_len),
            mem_len,
            size: 0,
            hits: 0,
            misses: 0,
        }
    }
pub fn new ( mem_len : usize ) -> Self { // Just make it work if an invalid value is thrown in let mem_len = mem_len . clamp ( 2 , u32 :: MAX as usize ) ; Self { map : HashMap :: new ( ) , list : VecDeque :: with_capacity ( mem_len ) , mem_len , size : 0 , hits : 0 , misses : 0 , } }
Create and initialize a new cache.
Create and initialize a new cache .
mem_len
usize