pub fn remove(&mut self, key: &K) -> Option<V> {
        let now = SystemTime::now();

        self.try_remove_expired_items(now);

        self.table
            .remove(key)
            .filter(|value| !value.has_expired(now))
            .map(|value| value.val)
    }
/// Removes a key from the cache.  Returns the value from the key if the key existed in the cache.
///
/// # Example
///
/// ```
/// use engine::store::Cache;
/// use std::time::Duration;
///
/// let mut cache = Cache::new();
///
/// let key: &'static str = "key";
/// let value: &'static str = "value";
///
/// let insert = cache.insert(key, value, None);
/// assert_eq!(cache.remove(&key), Some(value));
/// assert!(!cache.contains_key(&key));
/// ```
Removes a key from the cache.  Returns the value from the key if the key existed in the cache.
Removes a key from the cache . Returns the value from the key if the key existed in the cache .
pub fn remove(&mut self, key: &K) -> Option<V> {
        let now = SystemTime::now();
        self.try_remove_expired_items(now);
        self.table
            .remove(key)
            .filter(|value| !value.has_expired(now))
            .map(|value| value.val)
    }
pub fn remove ( & mut self , key : & K ) -> Option < V > { let now = SystemTime :: now ( ) ; self . try_remove_expired_items ( now ) ; self . table . remove ( key ) . filter ( | value | ! value . has_expired ( now ) ) . map ( | value | value . val ) }
Removes a key from the cache.
Removes a key from the cache .
&mut self
key
&K
&mut self
key
&K
example
```
use engine::store::Cache;
use std::time::Duration.

let mut cache = Cache::new().

let key: &'static str = "key";
let value: &'static str = "value".

let insert = cache.insert(key, value, None);
assert_eq!(cache.remove(&key), Some(value));
assert!(!cache.contains_key(&key));
```
` ` ` use engine :: store :: Cache ; use std :: time :: Duration . let mut cache = Cache :: new () . let key : & ' static str = " key " ; let value : & ' static str = " value " . let insert = cache . insert ( key value None ) ; assert_eq! ( cache . remove ( &key ) Some ( value )) ; assert! ( !cache . contains_key ( &key )) ; ` ` `