DAQCache class

Available extensions

Constructors

DAQCache.new({required DAQConfig config})

Properties

config DAQConfig
final
hashCode int
The hash code for this object.
no setterinherited
invalidationStream Stream<CacheInvalidationEvent>
Stream of cache invalidation events
no setter
keys List<String>
no setter
mutationStream Stream<CacheMutationEvent>
Stream of cache mutation events
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addToCache<T>(String key, T value, {List<String>? tags}) → void
clearAll() → void
dispose() → void
Dispose resources
executeWithDeduplication<T>(String key, Future<T> requestFn(), {List<String>? tags, bool? enableCaching}) Future<T>
getEntry<T>(String key) CacheEntry<T>?
getInflightRequest<T>(String key) Future<T>?
getKeysByPattern(String pattern) List<String>
getKeysByTag(String tag) List<String>
getTagsForKey(String key) Set<String>?
getValue<T>(String key) → T?
hasInflightRequest(String key) bool
hasKey(String key) bool
invalidateByPattern(String pattern) → void
invalidateByTags(List<String> tags) → void
invalidateKeys(List<String> keys) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeKey(String key) → void
toString() String
A string representation of this object.
inherited
updateCache<T>(String key, T updater(T?), {List<String>? tags}) → void
updateCacheBatch(List<String> mutatedKeys, Map<String, dynamic> mutatedData) → void
updateItemInInfiniteQuery<T>({required String keyPrefix, required dynamic matcher(T), required dynamic updater(T)}) → void

Available on DAQCache, provided by the InfiniteQueryMutationHelpers extension

Find by the matcher and replace with the updater in all query cache results, that start with the keyPrefix, and are of type DAQInfiniteQueryResponse

Operators

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