mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-19 21:53:19 +00:00
Moved DN cache to SOGoCache
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
/* SOGoCache.m - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2008-2013 Inverse inc.
|
||||
*
|
||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
* Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
* Copyright (C) 2008-2014 Inverse inc.
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -34,6 +31,9 @@
|
||||
* <uid>+defaults value = NSDictionary instance > user's defaults
|
||||
* <uid>+settings value = NSDictionary instance > user's settings
|
||||
* <uid>+attributes value = NSMutableDictionary instance > user's LDAP attributes
|
||||
* <uid>+failedlogins value =
|
||||
* <uid>+messagesubmissions value =
|
||||
* <uid>+dn value = NSString instance > cached user's DN
|
||||
* <object path>+acl value = NSDictionary instance > ACLs on an object at specified path
|
||||
* <groupname>+<domain> value = NSString instance (array components separated by ",") or group member logins for a specific group in domain
|
||||
* cas-id:< > value =
|
||||
@@ -435,7 +435,9 @@ static memcached_st *handle = NULL;
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
// Try to hit the local cache. If it misses, it'll
|
||||
// then try memcached. If it hits memcached, it'll
|
||||
// populate the local cache.
|
||||
//
|
||||
- (NSString *) _valuesOfType: (NSString *) theType
|
||||
forKey: (NSString *) theKey
|
||||
@@ -604,6 +606,21 @@ static memcached_st *handle = NULL;
|
||||
return d;
|
||||
}
|
||||
|
||||
//
|
||||
// DN caching
|
||||
//
|
||||
- (NSString *) distinguishedNameForLogin: (NSString *) theLogin
|
||||
{
|
||||
return [self _valuesOfType: @"dn" forKey: theLogin];
|
||||
}
|
||||
|
||||
- (void) setDistinguishedName: (NSString *) theDN
|
||||
forLogin: (NSString *) theLogin
|
||||
{
|
||||
[self _cacheValues: theDN
|
||||
ofType: @"dn"
|
||||
forKey: theLogin];
|
||||
}
|
||||
|
||||
//
|
||||
// CAS session support
|
||||
|
||||
Reference in New Issue
Block a user