FileCache class Null safety

Constructors

FileCache({required String path, bool useMemory = false, required Loader loader})

Properties

hashCode int
The hash code for this object.
read-onlyinherited
loader Loader
Load (Http Response) if file not exists.
final
path String
final
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
stats CacheStats
final
useMemory bool
keep bytes in memory, default false
final

Methods

cacheableSeconds(HttpClientResponse response) int?
Parse http header Cache-Control: max-age=300 return 300 expire seconds
clean() Future<bool>
getBytes(String url, {Encoding storeEncoding = utf8, int? forceCache}) Future<Uint8List>
getJson(String url, {Encoding encoding = utf8}) Future<Map>
load(String url) Future<CacheEntry?>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
remove(String url) Future<bool>
scanFolder() Future<ScanResult>
store(String url, CacheEntry entry, {Encoding encoding = utf8}) → void
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

fromDefault({Loader loader = defaultLoader, String? path, bool scan = false}) Future<FileCache>
We can provider capabity for multi instance. This function ONLY for convenience