Skip to content

Releases: mgnsk/evcache

v2.1.0

20 Feb 11:56
41d7a21
Compare
Choose a tag to compare
  • 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

18 Feb 09:25
d7cce42
Compare
Choose a tag to compare
  • Update documentation link for v2

v2.0.1

17 Feb 08:14
1ad4c3f
Compare
Choose a tag to compare
  • Fix module path for v2

v2.0.0

16 Feb 20:18
e1b130b
Compare
Choose a tag to compare

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

13 Feb 20:45
7079ed1
Compare
Choose a tag to compare
v2.0.0-rc.2 Pre-release
Pre-release
  • Optimize eviction
  • Make Get, Pop and Evict non-blocking

v2.0.0-rc.1

12 Feb 21:04
a6f9aa9
Compare
Choose a tag to compare
v2.0.0-rc.1 Pre-release
Pre-release

Interface seems to be finalized.

  • Rename OrderedRange to Do
  • Simplify the finalization of records

v1.6.0

12 Feb 19:25
29fefa0
Compare
Choose a tag to compare
  • 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.

v1.5.1

12 Feb 11:14
504c6b4
Compare
Choose a tag to compare
  • LFU order is now deterministic - fixed a bug where Fetch would increase record hits from 0 to 1 when creating the record.

EDIT: fix invalid tag

v1.5.0

12 Feb 09:10
19b0847
Compare
Choose a tag to compare
  • Implement func (c *Cache) Exists(key interface{}) bool
  • Clean up code and tests

v1.4.1

10 Feb 22:37
2c6c4d2
Compare
Choose a tag to compare
  • Unexport List, cleanup
  • update deps