Question

I want to enable caching for all Anonymous users of my site. But for logged in users of certain roles, I want to disable caching. I am using .net4/ASP.Net MVC2. How do I achive this?

Was it helpful?

Solution

OK... To answer my own question.. The short answer is no. There is no built in way to do this. But you can emulate this by dynamically adding a unique time stamp query string viz., ts=1234567890 to urls, for the logged in users you do not want to use caching.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top