EaseXCache class
💾 EaseX Cache Utilities
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
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
cacheData(
String key, dynamic data, {Duration? ttl}) → Future< void> - Cache data with optional TTL (Time To Live)
-
cacheFile(
String key, File file) → Future< String> - Cache a file to temporary storage
-
cacheImageFromUrl(
String url, String key) → Future< String?> - Cache image from network
-
cacheList<
T> (String key, List< T> items, {Duration? ttl}) → Future<void> - Cache list of items
-
cacheMap(
String key, Map< String, dynamic> data, {Duration? ttl}) → Future<void> - Cache map data
-
clearAllCache(
) → Future< void> - Clear all cached data
-
clearExpiredCache(
) → Future< void> - Clear expired cache entries
-
consolidateHttpClientResponseBytes(
HttpClientResponse response) → Future< List< int> > - Import missing dependencies
-
getCachedData<
T> (String key) → T? - Retrieve cached data
-
getCachedFilePath(
String key) → String? - Get cached file path
-
getCachedImage(
String key) → File? - Get cached image
-
getCachedList<
T> (String key) → List< T> ? - Get cached list
-
getCachedMap(
String key) → Map< String, dynamic> ? - Get cached map
-
getCacheKeys(
) → Set< String> - Get all cache keys
-
getCacheSize(
) → Future< int> - Get cache size in bytes
-
getCacheSizeFormatted(
) → Future< String> - Get cache size as human readable string
-
getCacheStats(
) → Future< Map< String, dynamic> > - Get cache statistics
-
hasCachedData(
String key) → bool - Check if cached data exists and is not expired
-
init(
) → Future< void> - Initialize cache system
-
removeCachedData(
String key) → Future< void> - Remove specific cached data
-
removeCachedFile(
String key) → Future< void> - Remove cached file