CacheManager class abstract

Abstraction for caching UI data locally for better performance.

Implementers

Constructors

CacheManager()

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

areBytesCached(String pathKey, String name) Future<bool>
Checks if a file is stored in the application's directory.
clearAll() Future<void>
Clears all of the cache.
delete(String key) Future<void>
Expires a value from the cache, given a key.
deleteAllByteData() Future<void>
Clears all of the files from the application's directory.
deleteBytes(String pathKey, String name) Future<void>
Deletes a file from the application's directory.
dispose() → void
Disposes the cache manager.
get<T>(String key, {T decode(Map<String, dynamic> value)?}) → T
Fetches a value from the cache, given a key.
getBytes(String pathKey, String name) Uint8List
Fetches a file from the application's directory.
init() Future<void>
Initializes the cache manager.
isCached(String key) bool
Checks if a value is cached, given a key.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
purgeBytes(String pathKey, {Iterable<String> excludedFileNames = const []}) Future<void>
Deletes all of the files from the given path, excluding the given files.
reset() → void
Invalidates this instance of the cache manager without disposing.
store(String key, dynamic value) Future<void>
Stores a value in the cache, given a key.
storeBytes(String pathKey, String name, Uint8List bytes) Future<void>
Stores a file in the application's directory.
toString() String
A string representation of this object.
inherited

Operators

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