Releases: mgnsk/evcache
Releases · mgnsk/evcache
v2.3.2
- Fixes a race bug introduced by previous release where the transaction waitgroup might have panicked when loading a record which was just evicted.
Previous release had the false assumption that readers use a cache RLock
but there is no such thing - the mutex is of type sync.Mutex
.
Readers only use record locks, hence the need to interleave cache and record locks (safe only on active records) to prevent concurrent delete and perform the second state transition safely.
v2.3.1
- Refactors most of the internals
- Removes record locking when evicting. It relies of the fact that the check-lock-check (record mutex) pattern for readers only works on the state transition default -> active and the cache mutex handles the transition active -> evicting.
- Documentation updates
v.2.3.0
v2.2.2
v2.2.1
v2.2.0
This release introduces eviction modes.
- There are two kinds of modes and the apply only when using an
EvictionCallback
. See the readme for the repo. - A long time race condition is fixed. An evicted record must not be reused in the pool. It is not know when the record stops being used since readers are not synchronized. A reader may load a value, meanwhile it may be evicted, the record reused in sync.Pool for another key and the first reader loads the wrong value. The pool still works for Fetch only and only if it does not store the record into the map.