DiskCache class

Singleton for managing cache files.

Constructors

DiskCache()
factory

Properties

currentEntries int
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
maxCommitOps int
read / write
maxEntries int
Maximum number of entries to store in the cache. [...]
read / write
maxSizeBytes int
Maximum size of entries to store in the cache in bytes. [...]
read / write
printError bool
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

cacheSize() Future<int>
Get cache folder size.
clear() Future<bool>
Evicts all entries from DiskCache.
evict(String uid) Future<bool>
Evicts a single entry from DiskCache, returning true if successful.
keepCacheHealth() Future<void>
Clean up the bad cache files in metadata.
load(String uid, {CacheRule rule, bool force}) Future<Uint8List>
Load the cache image from DiskCache, you can use force to skip max age check.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
save(String uid, Uint8List data, CacheRule rule) Future<bool>
Save the cache image to DiskCache.
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited