EnhancedCompositeCacheManager class
增强的复合缓存管理器(支持本地存储加载和条件保存)
- Implemented types
Constructors
- EnhancedCompositeCacheManager({CacheManager? memoryCache, required CacheManager localCache, int saveIntervalMs = TranslationConfig.defaultSaveInterval, int saveThreshold = TranslationConfig.defaultBatchSaveCount})
Properties
Methods
-
clear(
) → Future< void> -
清空所有缓存
override
-
contains(
String key) → Future< bool> -
检查是否包含缓存
override
-
delete(
String key) → Future< void> -
删除缓存
override
-
get(
String key) → Future< String?> -
获取缓存值
override
-
getAllEntries(
) → Future< Map< String, String> > -
获取所有键值对(用于批量操作)
override
-
getStats(
) → Map< String, dynamic> - 获取缓存统计信息
-
getSync(
String key) → String? -
获取缓存值(同步)
override
-
initialize(
) → Future< void> - 初始化时从本地存储加载所有数据到内存缓存
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
set(
String key, String value) → Future< void> -
设置缓存值
override
-
setAll(
Map< String, String> entries) → Future<void> -
批量设置键值对
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited