Skip to content

Latest commit

 

History

History
131 lines (83 loc) · 3.93 KB

CHANGELOG.md

File metadata and controls

131 lines (83 loc) · 3.93 KB

Moka — Change Log

Version 0.5.3

Added

  • Add support for some 32-bit platforms where std::sync::atomic::AtomicU64 is not provided. (e.g. armv5te-unknown-linux-musleabi or mips-unknown-linux-musl)
    • On these platforms, you will need to disable the default features of Moka. See the relevant section of the README.

Version 0.5.2

Fixed

  • Fix a bug in get_or_insert_with and get_or_try_insert_with methods of future::Cache by adding missing bounds Send and 'static to the init future. Without this fix, these methods will accept non-Send or non-'static future and may cause undefined behavior. (#31)
  • Fix usize overflow on big cache capacity. (#28)

Added

  • Add examples for get_or_insert_with and get_or_try_insert_with methods to the docs. (#30)

Changed

  • Downgrade crossbeam-epoch used in moka-cht from v0.9.x to v0.8.x as a possible workaround for segmentation faults on many-core CPU machines. (#33)

Version 0.5.1

Changed

  • Replace a dependency cht v0.4 with moka-cht v0.5. (#22)

Version 0.5.0

Added

  • Add get_or_insert_with and get_or_try_insert_with methods to sync and future caches. (#20)

Version 0.4.0

Fixed

  • Breaking change: Now sync::{Cache, SegmentedCache} and future::Cache require Send, Sync and 'static for the generic parameters K (key), V (value) and S (hasher state). This is necessary to prevent potential undefined behaviors in applications using single-threaded async runtime such as Actix-rt. (#19)

Added

  • Add invalidate_entries_if method to sync, future and unsync caches. (#12)

Version 0.3.1

Changed

  • Stop skeptic from having to be compiled by all downstream users. (#16)

Version 0.3.0

Added

  • Add an unsync cache (moka::unsync::Cache) and its builder for single-thread applications. (#9)
  • Add invalidate_all method to sync, future and unsync caches. (#11)

Fixed

  • Fix problems including segfault caused by race conditions between the sync/eviction thread and client writes. (Addressed as a part of #11).

Version 0.2.0

Added

  • Add an asynchronous, futures aware cache (moka::future::Cache) and its builder. (#7)

Version 0.1.0

Added

  • Add thread-safe, highly concurrent in-memory cache implementations (moka::sync::{Cache, SegmentedCache}) with the following features:
    • Bounded by the maximum number of elements.
    • Maintains good hit rate by using entry replacement algorithms inspired by Caffeine:
      • Admission to a cache is controlled by the Least Frequently Used (LFU) policy.
      • Eviction from a cache is controlled by the Least Recently Used (LRU) policy.
    • Expiration policies:
      • Time to live
      • Time to idle