lazy_memo 2.0.1 copy "lazy_memo: ^2.0.1" to clipboard
lazy_memo: ^2.0.1 copied to clipboard

Cached lazy variables that can be marked for re-initialization and memoized functions.

2.0.1 #

  • Added the extension type LazyPool representing a set of lazy variables with a collective invalidateCache method.

2.0.0 #

  • The following changes were made to the class Lazy:

    • Replaced the function updateCache() with the more suggestive invalideCache().
    • Added the getter isStale and removed isUpToDate.
    • Added the getter value returning the cached value of the lazy variable.
  • The classes LazyList, LazySet, and LazyMap now declared with ListMixin, SetMixin, and MapMixin, respectively. Thus they can be treated like unmodifiable collections when it comes to elements access, length, and the associated collection methods.

1.0.0 #

  • Added GenericMemoizedFunction, a memoized generic function without arguments.
  • Modified LazyList, LazySet, and LazyMap. The cached object is now an unmodifiable copy of the collection created by the user provided object factory.
  • Requires Dart 3.13.0.

0.2.5 #

  • Updated README.md

0.2.4 #

  • Updated dependencies
  • Removed benchmarks

0.2.3 #

  • Updated dependencies.
  • Amended documentation.

0.2.2 #

  • Removed variable _cacheView. Amended lazy_benchmark.dart.

0.2.1 #

  • Fixed LazyList, LazySet, and LazyMap. The call method now returns the same object until an update of the cache is requested.

0.2.0 #

  • Amended doc section lazy collections.

0.1.9 #

  • Added utility methods: factorial and combinations.
  • Added extension on int: ToBigInt.
  • Added benchmarks.

0.1.8 #

  • Added benchmark. Set min. SDK version to 3.0.0.
  • Updated example and docs (memoized functions).

0.1.7 #

  • Updated links.

0.1.6 #

  • Updated examples and docs. Added getters returning the argument type, return type, and function signature of memoized functions.

0.1.5 #

  • Added parameter functionTable to constructors of MemoizedFunction and MemoizedFunction2.

0.1.4 #

  • Update docs.

0.1.3 #

  • Updated dependencies.

0.1.2 #

  • Migrated CI to github.

0.1.1 #

  • Added the classes LazyList<T>, LazyMap<K, V>, LazySet<T>. These return a copy of the cached object to prevent external modification of the cache.

0.1.0 #

  • Removed ref. to experiment non-nullable. Set min. SDK version 2.12.0.
  • Switched back to default testing suite.

0.1.0-nullsafety #

  • Set min. Dart SDK version 2.12.0-0.

0.0.3-nullsafety #

  • Added class MemoizedFunction, representing a single-argument memoized function.

0.0.2-nullsafety #

  • Added getter isUpToDate.

0.0.1-nullsafety #

  • Initial version.
  • Requires Dart SDK version >= 2.10.0.
  • Null-safety must be enabled (see analysis_options.yaml).
4
likes
160
points
20k
downloads

Documentation

API reference

Publisher

verified publishersimphotonics.com

Weekly Downloads

Cached lazy variables that can be marked for re-initialization and memoized functions.

Repository (GitHub)
View/report issues

Topics

#lazy-variable #cached-variable #memoized-function

License

BSD-3-Clause (license)

More

Packages that depend on lazy_memo