feat: 添加缓存作用域支持多用户数据隔离
This commit is contained in:
Vendored
+3
-1
@@ -3,6 +3,8 @@ import 'dart:convert';
|
||||
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
import 'cache_scope.dart';
|
||||
|
||||
class CacheEntry<T> {
|
||||
const CacheEntry({required this.value, required this.fetchedAt});
|
||||
|
||||
@@ -196,7 +198,7 @@ class CacheInvalidator {
|
||||
void invalidate(String key) {
|
||||
final store = _store;
|
||||
if (store != null) {
|
||||
unawaited(store.remove(key));
|
||||
unawaited(store.remove(CacheScope.scopedKey(key)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user