syncache library

Classes

AlwaysOnline
A Network implementation that always reports online status.
AppendOperation<T>
Appends an item to the end of the list.
CacheResult<T>
A cache result containing a value and its metadata.
CacheResultMeta
Metadata about a cache result's source and freshness.
CancellationToken
A token that can be used to cancel asynchronous operations.
FetchResult<T>
Result of a fetch operation that supports HTTP caching semantics.
InsertOperation<T>
Inserts an item at a specific index.
ListOperation<T>
Describes an operation on a cached list.
LoggingObserver
A SyncacheObserver that logs cache operations.
MemoryStore<T>
An in-memory implementation of Store that supports tagging.
Metadata
Metadata associated with a cached entry.
Mutation<T>
Describes an optimistic mutation operation.
MutationRetryConfig
Configuration for mutation retry behavior.
Network
Abstract interface for checking network connectivity status.
PendingMutationInfo
Information about a pending mutation in the sync queue.
PrefetchGraphOptions
Options for controlling prefetch graph execution.
PrefetchGraphResult
Result of a prefetch graph execution.
PrefetchNode<T>
A node in a prefetch dependency graph.
PrefetchNodeResult
Result of a single node in a prefetch graph.
PrefetchRequest<T>
A request to prefetch a cache entry.
PrefetchResult
Result of a single prefetch operation.
PrependOperation<T>
Prepends an item to the beginning of the list.
QueryKey
A structured cache key with encoded parameters.
RemoveWhereOperation<T>
Removes items from the list that match a predicate.
RetryConfig
Configuration for retry behavior on transient failures.
ScopedSyncache<T>
A scoped view of a Syncache instance.
SharedMemoryStore<T>
A Store that shares data across instances with the same namespace.
Store<T>
Abstract interface for cache storage backends.
Stored<T>
A cached value with its associated metadata.
Syncache<T>
An offline-first cache and sync engine for Dart applications.
SyncacheObserver
Observer interface for monitoring Syncache operations.
SyncacheRequest
Contains request metadata for fetch operations.
TaggableStore<T>
Extended store interface that supports tagging entries.
UpdateWhereOperation<T>
Updates items in the list that match a predicate.

Enums

PendingMutationStatus
Status of a pending mutation.
Policy
Caching policies that determine how Syncache.get retrieves data.
PrefetchNodeStatus

Extensions

QueryKeyStringExtension on String
Extension on String to create QueryKey from string.
SyncacheListExtension on Syncache<List<T>>
Extension providing list-specific mutation helpers for Syncache<List<T>>.

Typedefs

ConditionalFetcher<T> = Future<FetchResult<T>> Function(SyncacheRequest request)
A fetcher that can return FetchResult to support HTTP 304 Not Modified.
Fetcher<T> = Future<T> Function(SyncacheRequest request)
A function that fetches data of type T from a remote source.

Exceptions / Errors

CacheMissException
Thrown when a cache lookup fails to find a value for the requested key.
CancelledException
Exception thrown when an operation is cancelled via CancellationToken.
SyncacheException
Base exception class for all Syncache-related errors.