Monotone-Parent: f5fee3205e018e405a45dbec6c9889f91ceb2eb2

Monotone-Revision: 927401b4ee5f346c42cc85dd63cd0389c175c226

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2008-01-16T19:52:43
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2008-01-16 19:52:43 +00:00
parent b1ccb3e7f8
commit 317f4e4651
2 changed files with 19 additions and 4 deletions

View File

@@ -1,5 +1,9 @@
2008-01-16 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/SOGo/SOGoCache.m ([SOGoCache
-registerObject:objectwithName:nameinContainer:container]):
register the object and its parents too.
* SoObjects/SOGo/SOGoUser.m ([SOGoUser
+userWithLogin:newLoginroles:newRoles]): try to retrieve the
specified user from the SOGoCache.

View File

@@ -92,11 +92,20 @@ static SOGoCache *sharedCache = nil;
{
NSString *fullPath;
if (object)
if (object && name)
{
[self registerObject: container
withName: [container nameInContainer]
inContainer: [container container]];
fullPath = [self _pathFromObject: container
withName: name];
[cache setObject: object forKey: fullPath];
if (![cache objectForKey: fullPath])
{
// NSLog (@"registering '%@'", fullPath);
[cache setObject: object forKey: fullPath];
}
// else
// NSLog (@"'%@' already registered", fullPath);
}
}
@@ -109,18 +118,20 @@ static SOGoCache *sharedCache = nil;
withName: name];
return [cache objectForKey: fullPath];
// if (object)
// NSLog (@"found cached object '%@'", fullPath);
}
- (void) registerUser: (SOGoUser *) user
{
NSLog (@"registerUser: %@", user);
// NSLog (@"registerUser: %@", user);
[users setObject: user forKey: [user login]];
}
- (id) userNamed: (NSString *) name
{
NSLog (@"userNamed: %@", name);
// NSLog (@"userNamed: %@", name);
return [users objectForKey: name];
}