From 44263b4aceb2b828b9823055a95c83d0e439042d Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Mon, 17 Feb 2014 11:31:40 -0400 Subject: fix get_size call --- mail/src/leap/mail/imap/memorystore.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'mail') diff --git a/mail/src/leap/mail/imap/memorystore.py b/mail/src/leap/mail/imap/memorystore.py index ed2b3f2..d0321ae 100644 --- a/mail/src/leap/mail/imap/memorystore.py +++ b/mail/src/leap/mail/imap/memorystore.py @@ -350,6 +350,12 @@ class MemoryStore(object): continue self._phash_store[phash] = weakref.proxy(referenciable_cdoc) + # Update memory store size + # XXX this should use [mbox][uid] + key = mbox, uid + self._sizes[key] = size.get_size(self._fdoc_store[key]) + # TODO add hdoc and cdocs sizes too + def prune(seq, store): for key in seq: if key in store and empty(store.get(key)): -- cgit v1.2.3