Fix Cache: Invalidate negative email caches when an account is created
This commit is contained in:
@@ -183,6 +183,11 @@ impl<K: Eq + Hash + CacheItemWeight, V: Clone + CacheItemWeight> CacheWithTtl<K,
|
||||
self.0.remove(key).map(|(_, v)| v.value)
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
pub fn retain(&self, f: impl Fn(&K) -> bool) {
|
||||
self.0.retain(|key, _| f(key));
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
pub fn clear(&self) {
|
||||
self.0.clear();
|
||||
|
||||
Reference in New Issue
Block a user