MultiLevelCache<T> class
Multi-level cache (Memory + Disk)
Constructors
- MultiLevelCache({CacheStrategy? strategy, StorageBackend? diskStorage})
Properties
-
diskCache
→ DiskCache<
T> ? -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
memoryCache
→ MemoryCache<
T> -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
cleanExpired(
) → void - Clean expired entries
-
clear(
) → Future< void> - Clear all caches
-
get(
String key) → Future< T?> - Get cached data (checks memory first, then disk)
-
getStats(
) → Map< String, dynamic> - Get cache statistics
-
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 (writes to both memory and disk)
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited