Open tatsuya6502 opened 1 year ago
Also an internal do_upsert_with_hash
method should check whether the existing entry is expired or not. If expired, it should skip to call the update
closure.
Since this feature is not released yet, I am setting enhancement
label rather than bug
.
As of now (commit #f7a15e24), the following issues might be present with the eviction handler:
invalidate
an existing entry will always trigger the eviction handler withRemovalCause::Explicit
.RemovalCause::Expired
.invalidate_all
.RemovalCause::Replaced
.RemovalCause::Replaced
orRemovalCause::Expired
based on the expiration status of the entry.For 1-a and 2-a, see
moka
's this unit test: moka sync/cache.rs#L4270-L4280