KachePersistenceBackend class abstract interface

A storage backend that persists typed cache entries.

Implementations own serialization, migrations, and physical storage. The core library passes typed values and an opaque KachePersistenceBinding without prescribing a record format.

Implementations must wrap backend-defined failures in KachePersistenceException using the operation being performed and one of the stages allowed by that exception's constructor.

Implementers

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>
Deletes every entry managed by this backend.
clearNamespace({required KacheNamespace namespace}) → Future<void>
Deletes every entry in namespace.
close() → Future<void>
Releases resources owned by this backend.
delete({required KacheKey key}) → Future<void>
Deletes the persisted entry for key when present.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
read<T>({required KacheKey key, required KachePersistenceBinding<T> binding}) → Future<KachePersistenceRead<T>?>
Reads the entry for key, or returns null when no entry exists.
toString() → String
A string representation of this object.
inherited
write<T>({required KacheKey key, required KachePersistenceBinding<T> binding, required KachePersistedEntry<T> entry}) → Future<void>
Writes a typed entry for key using binding.

Operators

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