Cache class
Storage for arbitrary assets.
A key may be derived from another by joining it to a parameter string with separator. Replacing the value at a key evicts everything derived from it, so live asset changes invalidate the entries built on top of them.
Every mutation notifies listeners exactly once, so consumers holding on to what they retrieved can re-resolve it.
- Inheritance
-
- Object
- ChangeNotifier
- Cache
Constructors
- Cache()
Properties
Methods
-
add<
T> (String key, T value) → void -
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
clear(
) → void -
contains(
String key) → bool -
dispose(
) → void -
Discards any resources used by the object.
inherited
-
evict(
String key) → bool -
evictDerived(
String key) → int -
Evicts every entry derived from
key, returning how many were removed. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
retrieve<
T> (String key) → T -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited