caching
Michael Ströder
michael at stroeder.com
Wed Apr 20 19:17:39 CEST 2005
Jerome Alet wrote:
>
> is there some caching mechanism in python-ldap ?
No.
> if not wouldn't it be desirable to have one ?
Maybe. It really depends...
Note that the caching in OpenLDAP client libs was considered broken.
That's why the wrapper code for making OpenLDAP's client-side caching
available to python-ldap was removed.
> if yes, I'm ok to try to do it.
I'd go for sub-classing LDAPObject and hook into method search_ext_s().
Well, caching for async search operations does not really make sense
anyway.
Issues which come to mind:
* There can be lots of subtle details to consider which might lead to
different search results (e.g. access control, the ManageDSAIT controls,
etc.)
* take care of flushing the right objects from your cache when modifying
entries
* for security reasons flush your whole cache when (re-)binding on a
given LDAP connection
I'm sure there are more issues...
Ciao, Michael.
More information about the python-ldap
mailing list