8185d0d872
(cherry picked from commit a4eb388ad9523675de6a28713e7f0fcce9b2f3f9)
610 B
610 B
5. 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