DiskCache class

Singleton for managing cache files.

Constructors

DiskCache()
factory

Properties

currentEntries → int
no setter
currentSizeBytes → int
no setter
hashCode → int
The hash code for this object.
no setterinherited
maxCommitOps ↔ int
getter/setter pair
maxEntries ↔ int
Maximum number of entries to store in the cache.
getter/setter pair
maxSizeBytes ↔ int
Maximum size of entries to store in the cache in bytes.
getter/setter pair
printError ↔ bool
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

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 nonexistent method or property is accessed.
inherited
save(String uid, Uint8List data, CacheRule rule) → Future<bool>
Save the cache image to DiskCache.
toString() → String
A string representation of this object.
inherited

Operators

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