adeutscher / DirectoryTools

0 stars 0 forks source link

TODO: Improve self.searchedGroups #2

Closed adeutscher closed 10 years ago

adeutscher commented 10 years ago

When going over the code, I realized that there were a lot of return statements in getGroupMembers that didn't check for depth and clear self.searchedGroups before returning the result.

Instead of tracking all of these possible exit points, I should put a single clearing self.searchGroups at the top of the getGroupMembers and any other method that uses self.searchedGroups.

In addition, each cache-using call should use a unique cache, in case a cache-using method calls another cache-using method.

adeutscher commented 10 years ago

Additional note: self.searchedGroups should only be populated by DNs.

adeutscher commented 10 years ago

Already somewhat implemented in past commits as flushCaches(). Still need to make sure that it's covered in all the necessary places.

adeutscher commented 10 years ago

Expanding the scope of this ticket. Just in case one cache-using item calls another cache-using item that uses a clean slate. Updating description.

adeutscher commented 10 years ago

Adjusted caching system. Different calls of recursive functions such as getGroupMembers() (i.e. getting the members of two different groups) will use separate caches.

Tested against Active Directory:389, Active Directory:3268, and FreeIPA.