Cache<T> class

キャッシュ処理をサポートするWrapper Object.

NOTE. 設計として、キャッシュそれ自体をData Objectのequals対象としてはならない. また、equals系は例外を吐いて終了する.

Cacheそれ自体をequals対象としたり、比較するのであれば、それはこのCache

Constructors

Cache()

Properties

hashCode int
The hash code for this object.
no setteroverride
hasValue bool
すでに値を生成済みであればtrue.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

get(T lazy()) → T
キャッシュを取得し、キャッシュが未生成であれば lazy 関数を通じてキャッシュを生成する. このメソッドは getAsync と排他仕様であり、同時に実行された場合の動作保証を行わない.
getAsync(Future<T> lazy(), {bool withLock = true}) Future<T>
キャッシュを取得し、キャッシュが未生成であれば lazy 関数を通じてキャッシュを生成する. このメソッドは get と排他仕様であり、同時に実行された場合の動作保証を行わない. withLock がtrueの場合、内部では非同期の排他制御が行われる.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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