HiveRepositoryCacheStorage class

A cache storage implementation that uses Hive.

This class stores the data in a Box using the hashed key as the key. The data is stored as a String.

Inheritance

Constructors

HiveRepositoryCacheStorage({required Box<String> box})
A cache storage implementation that uses Hive.

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>
Clears the cache.
override
delete({required String key}) Future<void>
Delete a value from the cache.
override
hashKey(String key) String
Hashes a key to be used as a cache key.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
read({required String key}) Future<String?>
Read a value from the cache.
override
toString() String
A string representation of this object.
inherited
write({required String key, required String value}) Future<void>
Write a value to the cache.
override

Operators

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

Static Methods

create() Future<HiveRepositoryCacheStorage>
Creates a HiveRepositoryCacheStorage with a default Box named repository-caches.