3799f39a15
(cherry picked from commit 0a1c659327d74bc0b9c50fe2b2b1e7d3f3fcd1ae)
611 B
611 B
27. Use TupleKey store data cache
Date: 2023-04-27
Status
Accepted
Context
- Multiple accounts login at the same time in the same browser. The accounts will use the same database (
IndexDatabase).
Decision
- Use unique parameters (
AccountId,UserName,ObjectId(MailboxId/EmailId/StateType) to form a uniquekeyfor storage (calledTupleKey). - TupleKey has the format:
ObjectId | AccountId | User; HiveDatabaseincludes manyBox. Each box is aMap<Key, Object>withkey=TupleKey.
Consequences
- The correct
mailboxandemaillists are obtained for each account