AsyncCacheDelegate<D extends Object, P extends Object> class abstract

Delegate that asynchronously performs caching operations D - data type to store P - params type

Implementers
Available extensions

Constructors

AsyncCacheDelegate(SyncCacheDelegate<D, P> sync)
Wraps a sync delegate and adapts it to async world
const
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

delete(P params) Future<void>
Deletes cached value params Caching key
get(P params) Future<Entity<D>?>
Returns data if cached params Caching key
invalidate(P params) Future<void>
Invalidates cached value params Caching key
invalidateAll() Future<void>
Invalidates all cached values
isolated() AsyncCacheDelegate<D, P>

Available on AsyncCacheDelegate<D, P>, provided by the IsolateCacheDelegateExtension extension

Wraps AsyncCacheDelegate with Isolate for long-running operations
makeFriendParams<P extends Object>(String stringify(P params)) AsyncCacheDelegate<D, P>

Available on AsyncCacheDelegate<D, CacheFriend>, provided by the AsyncCacheFriendExtension extension

Creates an adapter delegate that creates CacheFriend params using stringify function Receiver - Delegate with CacheFriend params e.g. the one that saves data to files and uses params as file names
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
save(P params, Entity<D> entity) Future<void>
Saves data to cache params Caching key entity Entity to cache
toString() String
A string representation of this object.
inherited

Operators

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