ApiCacheStore class abstract interface

Where an ApiCache keeps its answers, and whose they are.

Implementations may fail at any call; the cache logs the failure and carries on in memory.

Implementers

Constructors

ApiCacheStore.persistent({String name = 'slick_api_cache'})
The store that survives a restart on this platform: IndexedDB on the web, files under the application support directory on Android, iOS and desktop, memory anywhere else. name names the database or directory.
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

clear() → Future<void>
Removes every answer. The owner is left as it is.
get(String key) → Future<StoredAnswer?>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
prune({required DateTime savedBefore}) → Future<void>
Removes every answer saved before savedBefore.
put(String key, StoredAnswer answer) → Future<void>
readOwner() → Future<String?>
The identity the saved answers belong to, as last written.
toString() → String
A string representation of this object.
inherited
writeOwner(String? owner) → Future<void>

Operators

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