TF-141 Delete cache when logout

This commit is contained in:
dab246
2021-10-06 23:52:43 +07:00
committed by Dat H. Pham
parent 54b63cfa61
commit 4fc985b314
6 changed files with 51 additions and 4 deletions
+18
View File
@@ -0,0 +1,18 @@
import 'package:tmail_ui_user/features/caching/mailbox_cache_client.dart';
import 'package:tmail_ui_user/features/caching/state_cache_client.dart';
class CachingManager {
final MailboxCacheClient _mailboxCacheClient;
final StateCacheClient _stateCacheClient;
CachingManager(this._mailboxCacheClient, this._stateCacheClient);
Future<void> clearAll() async {
await Future.wait([
_stateCacheClient.deleteBox(),
_mailboxCacheClient.deleteBox(),
]);
}
}