Monotone-Parent: 54ec8c39f5bb2075a087aabb062d28af978421de

Monotone-Revision: 36eb21ac828a920f7994e922c1c7e6fe481c62ac

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2008-01-16T18:57:58
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2008-01-16 18:57:58 +00:00
parent 8731c448c3
commit d36fb810d5
5 changed files with 44 additions and 6 deletions
+13 -3
View File
@@ -62,6 +62,7 @@
#import "NSDictionary+Utilities.h"
#import "NSString+Utilities.h"
#import "SOGoCache.h"
#import "SOGoObject.h"
@interface SOGoObject(Content)
@@ -560,10 +561,19 @@ static BOOL kontactGroupDAV = YES;
acquire: (BOOL) acquire
{
id obj;
SOGoCache *cache;
obj = [[self soClass] lookupKey: lookupName inContext: localContext];
if (obj)
[obj bindToObject: self inContext: localContext];
cache = [SOGoCache sharedCache];
obj = [cache objectNamed: lookupName inContainer: self];
if (!obj)
{
obj = [[self soClass] lookupKey: lookupName inContext: localContext];
if (obj)
{
[obj bindToObject: self inContext: localContext];
[cache registerObject: obj withName: lookupName inContainer: self];
}
}
return obj;
}