pub trait Filter<K, V>:
Fn(&K, &V) -> bool
+ Send
+ Sync
+ 'static { }Expand description
The filter for the in-memory cache.
The filter is used to decide whether to admit or reject an entry based on its key and value.
If the filter returns true, the key value can be inserted into the in-memory cache; otherwise, the key value cannot be inserted.
To ensure API consistency, the in-memory cache will still return a cache entry, but it will not count towards the in-memory cache usage, and it will be immediately reclaimed when the cache entry is dropped.