Improve caching and add method to retrieve roles for a given type URI.

Change-Id: I1a5aee595f28a5ebb2cc1c5806bce22ece8170f0