pub trait UpdateValidator<V>: Send + Sync + 'static {
    fn should_update(&self, prev: &V, curr: &V) -> bool;
}
Expand description

By default, the Cache will always update the value if the value already exists in the cache, this trait is for you to check if the value should be updated.

Required methods

should_update is called when a value already exists in cache and is being updated.

Implementors