Memoized2WithKey<A, B, R> class

Memoization wrapper for a function with two arguments and a custom key generator.

Inheritance

Constructors

Memoized2WithKey(R _fn(A, B), String _keyFn(A, B), {MemoizeOptions options = MemoizeOptions.unlimited})

Properties

cacheSize int
Returns the current cache size.
no setteroverride
cacheStats Map<String, dynamic>
Returns statistics about the cache usage.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
isComputed bool
Check if the memoized value is successfully computed.
no setterinherited
isExpired bool
Check if the memoized value is expired.
no setterinherited
isNotComputedYet bool
Check if the memoized value is not computed yet.
no setterinherited
options MemoizeOptions
Configuration options for this memoized function.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

call(A a, B b, {bool forceRecompute = false}) → R
clearCache() → void
Clears all cached values, forcing recomputation on next call.
override
expire() → void
Marks the cached value as expired, so the next call will trigger a recomputation.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited