Description of problem: Currently the nscd can cache results per database (passwd, group, ...) but not per source. It would be beneficial if it was possible to allow the nscd to only cache results from one database. In particular, it would help the case where the administrator would rely on caching mechanism of the other database source completely. A real-world example is a machine that is configured using "files sss" as the sources. The SSSD can cache results of initgroups operation for identity lookups (think id $user from shell) but always reads the initgroups data from the remote server during login to provide accurate access control data. Therefore enabling nscd globally for all lookups is not a good choice. On the other hand, caching lookups from files does bring a reasonable speed benefit as /etc/passwd does not have to be read every time. So in the ideal case, nscd could be configured to cache lookups from the "files" database while allowing the libc interface call like getpwnam to always reach the "sss" module and let it decide about caching.
The initgroups use case has been covered by sss caching files directly. The remaining enhancement request is tracked upstream here: https://sourceware.org/bugzilla/show_bug.cgi?id=24990