I am writing a custom HttpModule
and I need to use:
Response.Cache.SetVaryByCustom("role");
Basically, I need to cache responses based on a user's membership role. All my research has pointed me to the page:
http://msdn.microsoft.com/en-us/library/5ecf4420(v=vs.100).aspx
Where it is suggesed to override GetVaryByCustomString
in Global.asax.
Is there a way I can avoid doing this in global.asax? Let's just assume I'm building a shrink wrapped application.