KacheQuery<T> class final

An immutable declaration of how to obtain and cache one typed value.

Constructors

KacheQuery.memory({required KacheKey key, KacheFetcher<T>? fetch, KachePolicy? policy, String? debugName, Map<String, Object?> metadata = const <String, Object?>{}})
Creates a process-memory query.
factory
KacheQuery.networkOnly({required KacheKey key, required KacheFetcher<T> fetch, Duration? refreshInterval, String? debugName, Map<String, Object?> metadata = const <String, Object?>{}})
Creates a query that always fetches and never reads or writes cache data.
factory
KacheQuery.persisted({required KacheKey key, KacheFetcher<T>? fetch, required KachePersistenceBinding<T> binding, KachePolicy? policy, String? debugName, Map<String, Object?> metadata = const <String, Object?>{}})
Creates a query backed by an opaque persistence binding.
factory

Properties

binding KachePersistenceBinding<T>?
Opaque backend-specific binding for persisted queries.
final
debugName String?
Optional caller-supplied observer label.
final
fetch KacheFetcher<T>?
The optional network or service fetch operation.
final
hashCode int
The hash code for this object.
no setterinherited
key KacheKey
Stable cache identity shared by compatible handles.
final
metadata Map<String, Object?>
Immutable caller-supplied observer metadata.
final
policy KachePolicy
Freshness and lifecycle revalidation rules.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
storageMode KacheStorageMode
Where this query stores data.
final
valueType Type
The reified Dart value type used for shared-key compatibility checks.
no setter

Methods

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