diff options
author | Kali Kaneko <kali@leap.se> | 2014-02-07 02:54:52 -0400 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2014-02-17 11:38:24 -0400 |
commit | 813db4a356141592337f39f9c801203367c63193 (patch) | |
tree | 72192408155c5852ca50575b424cd9f0b3544f79 /src/leap/mail/imap/memorystore.py | |
parent | 3149bbe64346d558ef300a3d760732cf499a28d3 (diff) |
remove hdoc copy since it's in its own structure now
Diffstat (limited to 'src/leap/mail/imap/memorystore.py')
-rw-r--r-- | src/leap/mail/imap/memorystore.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/leap/mail/imap/memorystore.py b/src/leap/mail/imap/memorystore.py index b198e12..4156c0b 100644 --- a/src/leap/mail/imap/memorystore.py +++ b/src/leap/mail/imap/memorystore.py @@ -592,7 +592,8 @@ class MemoryStore(object): :param mbox: the mailbox :type mbox: str or unicode - :param flag_docs: a dict with the content for the flag docs. + :param flag_docs: a dict with the content for the flag docs, indexed + by uid. :type flag_docs: dict """ # We can do direct assignments cause we know this will only @@ -601,6 +602,20 @@ class MemoryStore(object): for uid in flag_docs: fdoc_store[uid] = ReferenciableDict(flag_docs[uid]) + def load_header_docs(self, header_docs): + """ + Load the flag documents for the given mbox. + Used during header docs prefetch, and during cache after + a read from soledad if the hdoc property in message did not + find its value in here. + + :param flag_docs: a dict with the content for the flag docs. + :type flag_docs: dict + """ + hdoc_store = self._hdoc_store + for chash in header_docs: + hdoc_store[chash] = ReferenciableDict(header_docs[chash]) + def all_flags(self, mbox): """ Return a dictionary with all the flags for a given mbox. |