Skip to content

Releases: Zekfad/weak_cache

2.1.3

23 Jun 23:03
0362cb7

Choose a tag to compare

  • Fix possible cast error in update and putIfAbsent.

    MapBase uses containsKey which is unreliable and creates data
    race (due to GC) between check and read.

  • Optimize length.

    MapBase uses keys.length which causes iteration and creation of
    strong snapshot.

2.1.2

22 Jun 17:03
8cb2c91

Choose a tag to compare

2.1.2

  • Optimize cache entry removal performance.

    Previously removeWhere was used which caused iteration of whole cache set
    on every removal.
    Now additional Expando is used to map Weak references to their keys.

2.1.1

  • Fix web release target compilation.

2.1.0

  • Add weak_cache.utils library with expandoCompatible utility function.
  • Update type check, to correctly detect all disallowed values types.

2.0.1

03 Feb 17:43
4674d44

Choose a tag to compare

  • Remove dependency on package:disposed.
  • Fix "leak" of nulled Weak references, if objects where added while iterating.

    Generally you should not modify cache while iterating it, but this is technically possible.

2.0.0

30 Jun 17:04
76c3837

Choose a tag to compare

  • Requires Dart 3.0.0
  • BREAKING: remove WeakCache.cacheFinalizer.
  • Fix memory leak caused by instance member finalizer.
  • Optimize containsValue.
  • Fix concurrent modification error, now using keys/values/entries
    will temporarily prevent them from being garbage collected.

1.0.0 - Initial release

20 May 21:43
0883634

Choose a tag to compare

Initial release