Any suggestions on how to optimize role provider?s GetRolesForUser() method? Whenever we call User.IsInRole() method. Internally it calls Role provider's GetRolesForUser() method. In your application if you are using SiteMap provider and URLAuthorization, then GetRolesForUser() method will get call several time for each request. Because both (SiteMapProvider and URLAuthorization) uses User.IsInRole() method several time.
So I want to optimize GetRolesForUser() method so it won?t hit the database every time.
Any suggestions?
Go to the complete details ...