MustangCache class

MustangCache is disk-based key-value database

It allows clients to save stringified objects to the disk. When a serialized object is read from the cache, it will be deserialized and saved to the MustangStore.

Constructors

MustangCache()

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

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

addObject(String key, String modelKey, String modelValue) Future<void>
Writes stringified object to the disk.
deleteObjects(String key) Future<void>
Delete all serialized objects from the cache
initCache(String cacheName, String? storeLocation) Future<void>
Creates a directory on the disk to save stringified objects. storeLocation is optional for Web.
itemExists(String key) bool
Checks if an object exists in the cache using it's key
restoreObjects(String key, void callback(void update<T>(T t), String modelName, String jsonStr)) Future<void>
Deserializes objects in the cache and load them into the Mustang Store. Note: Deserialization has to be done by the caller. This method only returns serialized objects and their types.