CachePreloader class
A class that handles preloading data into the cache.
Constructors
- CachePreloader.new(DataCacheX _cache)
- Creates a new instance of CachePreloader.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
operations
→ Map<
String, PreloadOperation> -
Gets the operations that are currently in progress.
no setter
-
preloadEvents
→ Stream<
PreloadOperation> -
Gets the stream of preload events.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
cancelAllPreloads(
) → int - Cancels all preloading operations.
-
cancelPreload(
String key) → bool - Cancels a preloading operation.
-
clearCompletedOperations(
) → int - Clears completed operations from the operations map.
-
dispose(
) → void - Disposes the preloader.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
preload<
T> ({required Map< String, Future< dataProviders, CachePolicy? policy, Set<T> Function()>String> ? tags, int parallelism = 5, void onProgress(String key, PreloadStatus status, double progress)?}) → Future<Map< String, PreloadOperation> > - Preloads data into the cache.
-
preloadInBackground<
T> ({required Map< String, Future< dataProviders, CachePolicy? policy, Set<T> Function()>String> ? tags, int parallelism = 5, void onProgress(String key, PreloadStatus status, double progress)?}) → Stream<PreloadOperation> - Preloads data into the cache in the background.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited