Releases: mgnsk/evcache
Releases · mgnsk/evcache
v2.1.0
- Implement
func (c *Cache) CompareAndEvict(key, old interface{}) bool
. It becomes useful when there's an error while using a value and it needs to be evicted but meanwhile the cache may already hold a new value for key.CompareAndEvict
makes sure that with multiple concurrent evicters only the old value is evicted.
v2.0.2
v2.0.1
v2.0.0
This is the new major release of evcache
.
The biggest change was making most of the methods non-blocking, except for Set
and Fetch
which block when storing a value.
When the value exists, Fetch
does not block and returns it immediately.
Do
is now also safe to call concurrently but will block Pop
, Evict
, Set
and Fetch
(only when storing).
v2.0.0-rc.2
- Optimize eviction
- Make
Get
,Pop
andEvict
non-blocking
v2.0.0-rc.1
Interface seems to be finalized.
- Rename
OrderedRange
toDo
- Simplify the finalization of records
v1.6.0
- Implements
func (c *Cache) LoadAndEvict(key interface{}) (interface{}, bool)
and
func (c *Cache) Pop() (key, value interface{})
.
Since the records are ordered by insertion order by default, the cache can be used as a queue. - The background loop will no longer
RLock
the records. - The background loop will only run when LFU is used or the first non-zero TTL record is stored.