BaseCacheManager class abstract
Abstract interface for cache managers.
Provides the minimum API surface needed for caching network files. Implementations should handle downloading, storing, and retrieving cached files.
- Implementers
Constructors
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
-
dispose(
) → Future< void> - Close the cache database.
-
emptyCache(
) → Future< void> - Remove all files from the cache.
-
getFileFromCache(
String key, {bool ignoreMemCache = false}) → Future< FileInfo?> - Get the file from the cache.
-
getFileStream(
String url, {String? key, Map< String, String> ? headers, bool withProgress}) → Stream<FileResponse> - Get the file from the cache and/or online, depending on availability and age.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
putFile(
String url, List< int> fileBytes, {String? key, String? eTag, Duration maxAge = const Duration(days: 30), String fileExtension = 'file'}) → Future<File> - Put a file in the cache.
-
removeFile(
String key) → Future< void> - Remove a file from the cache.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited