[389-devel] lib389: cleanup __init__

Rich Megginson rmeggins at redhat.com
Thu Oct 31 16:40:25 UTC 2013


On 10/31/2013 10:35 AM, Roberto Polli wrote:
> Hi Rich,
>
> On Thursday 31 October 2013 10:32:13 Rich Megginson wrote:
>>> I thought - a long time ago actually - to remove from DSAdmin all cached
>>> references to backends, suffixes and configuration.
>> Part of the complexity is due to trying to keep data across a restart
> I agree with credential caching - as they should be quite unmutable, and I was
> talking about __initPart2() which is called by __init__.
>
> Are all the __initPart2() attributes essential?

No.  You could do "lazy evaluation" of those fields.  For example, 
instead of having a .dbdir field, have a .getdbdir() member that would 
do an ldapsearch if .dbdir is None.

>
> Peace,
> R:
>



More information about the 389-devel mailing list