# Run modify operation
self.ldap.modify_s(self.dn, modlist)
- # Clear cache
- self._clear_cache()
-
- def _clear_cache(self):
- """
- Clears cache
- """
- pass
-
def _set(self, key, values):
current = self._get(key)
return attrs
def get_by_dn(self, dn):
- attrs = self.memcache.get("accounts:%s:attrs" % dn)
- if attrs is None:
- attrs = self._get_attrs(dn)
- assert attrs, dn
-
- # Cache all attributes for 5 min
- self.memcache.set("accounts:%s:attrs" % dn, attrs, 300)
+ attrs = self._get_attrs(dn)
return Account(self.backend, dn, attrs)
return NotImplemented
- def _clear_cache(self):
- # Delete cached attributes
- self.memcache.delete("accounts:%s:attrs" % self.dn)
-
@property
def kerberos_principal_dn(self):
return "krbPrincipalName=%s@IPFIRE.ORG,cn=IPFIRE.ORG,cn=krb5,dc=ipfire,dc=org" % self.uid