TF-1869: Duplicate check for OpenedEmail and DetailedEmail when get contents

(cherry picked from commit 674312c3dd515b5699c84d3572bdc7bed9e7415d)
This commit is contained in:
HuyNguyen
2023-05-23 18:05:04 +07:00
committed by Dat Vu
parent 7267ee2c64
commit 109ea54204
6 changed files with 61 additions and 6 deletions
@@ -96,4 +96,9 @@ class EmailCacheManager {
final keyCache = TupleKey(emailCache.id, accountId.asString, userName.value).encodeKey;
return _emailCacheClient.insertItem(keyCache, emailCache);
}
Future<EmailCache?> getEmailFromCache(AccountId accountId, UserName userName, EmailId emailId) {
final keyCache = TupleKey(emailId.asString, accountId.asString, userName.value).encodeKey;
return _emailCacheClient.getItem(keyCache);
}
}