CodelesslyCacheManager class

Handles caching of any data that needs to be cached via Hive.

Inheritance

Constructors

CodelesslyCacheManager({required CodelesslyConfig config})
Creates a CodelesslyCacheManager instance with the provided config.

Properties

box ↔ Box
The Box instance used to store any arbitrary data excluding byte information.
getter/setter pair
config CodelesslyConfig
The configuration used by the Codelessly SDK.
final
filesBox ↔ Box
The Box instance used to store any byte information, mainly used for storing font files.
getter/setter pair
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.
override
clearAll() Future<void>
Clears all of the cache.
override
delete(String key) Future<void>
Expires a value from the cache, given a key.
override
deleteAllByteData() Future<void>
Clears all of the files from the application's directory.
override
deleteBytes(String pathKey, String name) Future<void>
Deletes a file from the application's directory.
override
dispose() → void
Disposes the cache manager.
override
get<T>(String key, {T decode(Map<String, dynamic> value)?}) → T
Fetches a value from the cache, given a key.
override
getBytes(String pathKey, String name) Uint8List
Fetches a file from the application's directory.
override
init() Future<void>
Initializes the cache manager.
override
isCached(String key) bool
Checks if a value is cached, given a key.
override
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.
override
reset() → void
Invalidates this instance of the cache manager without disposing.
override
store(String key, dynamic value) Future<void>
Stores a value in the cache, given a key.
override
storeBytes(String pathKey, String name, Uint8List bytes) Future<void>
Stores a file in the application's directory.
override
toString() String
A string representation of this object.
inherited

Operators

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