Login link is cached as well, so even showing when logged in

Sep 15, 2013 at 10:30 PM
thanks for the tutorial.. One heads-up though is that when enabling caching on the HomeController also the login in link still shows up even after the user has logged in..

What additional exception is required to cover this? VaryByHeader = "X-Requested-With;Accept-Language, xyz?"
Nov 1, 2013 at 12:52 AM
You can use VaryByCustom similar to what is shown here: http://stackoverflow.com/questions/2289941/outputcache-controller-attribute-vary-by-user-role-is-this-possible-in-net-mvc.

I'd recommend not caching the entire page, perhaps. Separate the list of reviews into a partial view and only cache the partial.