Zentyal/sogo — pull request #55 by blaxter (2014-10-27 10:37:54+00:00)
Title: Fix contacts cached that don't belong to our domain

Contact info is cached as a json string, but current json parser does not support single values (like "null").

Any contact outside our domain was not being cached properly ("null" was stored in the cache but we couldn't get it back because objectFromJSONString was failing) and every time an address was found a ldap request was performed against samba.

So in the end this is just to be able to do:

NSString *foo = @"\"null\""
[foo objectFromJSONString] == [NSNull nil]

For big mailboxes is quite an improvement in performance. (For 19k emails, instead of ~1 hour importing them, it took ~15 minutes).