DiskCache<T> class
Disk cache implementation
Constructors
- DiskCache({required StorageBackend storage, CacheStrategy? strategy, String prefix = 'cache_'})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- prefix → String
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- storage → StorageBackend
-
final
- strategy → CacheStrategy
-
final
Methods
-
clear(
) → Future< void> - Clear all cached data
-
get(
String key) → Future< CachedData< T> ?> - Get cached data
-
has(
String key) → Future< bool> - Check if key exists
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
remove(
String key) → Future< void> - Remove cached data
-
set(
String key, T data, {Duration? ttl}) → Future< void> - Set cached data
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited