URL: https://github.com/SSSD/sssd/pull/154 Title: #154: Confront caches first
pbrezina commented: """ Hi, thank you. This version looks much better. There where few logic issues in the code, I started to write the review but then I had a need to actually try to code my suggestions to see if it may work. So I'm sorry that I won't write it down and let you implement it your way this time. Please, see my patches and include them/inspire yourself in writing your own.
I fixed the logic of confront cache in a way that it now contains several shortcut on phases where we know we don't have to iterate to next domain. I also removed code duplication in function dealing with new results. And finally I made the selection of proper search schema more explicit. I did not test these patches besides our available automated tests.
Repo: https://github.com/pbrezina/sssd/commits/cache_req """
See the full comment at https://github.com/SSSD/sssd/pull/154#issuecomment-285342833