I am coding an ASP.NET MVC 3 application. The Navigation menu is created dynamically from DB based on permission set for user, using a child action. Users are allocated to Usergroups/Roles, but then they can also have some certain specific additional permissions. I am having a Hashset being returned by Authorization Services for all the privileges for current user. Most of users would have same privileges as the usergroup (no additional privileges). So, i want to cache the navigation menu.
Questions, 1. I need to use VaryByCustom option for OutputCache attribute? 2. How should i create unique keys for hashtables having same set of permissions (may be added to hashset in different order)?