MemoryCacheStrategy class
内存缓存策略
- Implemented types
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
-
cleanExpired(
) → Future< int> -
清理过期缓存
override
-
cleanIfOverLimit(
) → Future< void> -
清理超限缓存
override
-
clear(
) → Future< void> -
清空所有缓存
override
-
delete(
String key) → Future< void> -
删除指定缓存
override
-
get<
T> (String key, T fromJson(Map< String, dynamic> )) → Future<T?> -
获取缓存
override
-
getStats(
) → Future< CacheStats> -
获取统计信息
override
-
initialize(
{bool enableAutoClean = true, Duration autoCleanInterval = const Duration(hours: 1), int maxCacheSizeMB = 100}) → Future< void> -
初始化
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
set<
T> (String key, T data, {Duration? expiration, int priority = 5}) → Future< void> -
保存缓存
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited