Is there a way to use ASP.NET Outputcache for page for both:
- VaryByContentEncoding - whether the browser support gzip or not
- By custom param, in my case country which I get from using HttpContext.Current.Request.UserLanguages; and getting the TwoLetterISORegionName from the culture that on of my function returns.
For some countries I return the same page but with minor modifications, but I still want those to be caches separately in order for visitors from different countries to see different social buttons. Of course the support for gzip or not is important because I render a js and css tags with gzip if the browser does support gzip compression.
Update: I thought about using varybycontrol, and put the country + gzip status (o or 1) both into a string and write them into a hidden field and than tell .net to varybycontrol and pass the ID of that hidden field control. I am not sure about this approach though.
Thanks.