summaryrefslogtreecommitdiff
path: root/pykolab
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-04-27 14:02:34 (GMT)
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-04-27 14:02:34 (GMT)
commit3bcd24035724cad66dd989a0007407d3a037c037 (patch)
tree6918a88dd2e5ca194ec3e663e0cc8d28217b65c5 /pykolab
parent7735e7549ffee28d279d5cd49008c4095aca56b8 (diff)
downloadpykolab-3bcd24035724cad66dd989a0007407d3a037c037.tar.gz
Simplify use of caching
Diffstat (limited to 'pykolab')
-rw-r--r--pykolab/auth/ldap/__init__.py16
1 files changed, 1 insertions, 15 deletions
diff --git a/pykolab/auth/ldap/__init__.py b/pykolab/auth/ldap/__init__.py
index 5990a4d..c43700f 100644
--- a/pykolab/auth/ldap/__init__.py
+++ b/pykolab/auth/ldap/__init__.py
@@ -1025,21 +1025,7 @@ class LDAP(pykolab.base.Base):
for key in rcpt_addrs.keys():
entry[key] = rcpt_addrs[key]
- db = cache.init_db(self.domain)
- _entry = db.query(cache.Entry).filter_by(uniqueid=entry['id']).first()
- if _entry == None:
- db.add(cache.Entry(
- entry['id'],
- entry[result_attribute],
- entry['modifytimestamp']
- ))
-
- _entry = db.query(cache.Entry).filter_by(uniqueid=entry['id']).first()
-
- db.commit()
-
- if not conf.changelog.has_key(entry['id']):
- conf.changelog[entry['id']] = entry[result_attribute]
+ cache.get_entry(entry)
self.imap.connect(domain=self.domain)