CacheManager class

Constructors

CacheManager(CacheStorage _storage, {Duration cleanupInterval = const Duration(days: 1), int maxCacheSize = 1000, Duration defaultCacheDuration = const Duration(hours: 24)})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stats → CacheStats
获取缓存统计信息
no setter

Methods

clear() Future<void>
close() Future<void>
forceCleanup() Future<void>
get(String key) Future
init() Future<void>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove(String key) Future<void>
save(String key, dynamic data, {Duration? duration}) Future<void>
toString() String
A string representation of this object.
inherited

Operators

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