Disable caching on a partial view in MVC 3
问题 I have an issue with a partial View being cached when it shouldn't be. This partial View is used to display the Logon/Logoff on a page. It uses the simple code below to figure out which link to display @if(Request.IsAuthenticated) { <a href="@Url.Action("LogOff", "Account", new { area = "" })">Log Off</a> } else { <a href="@Url.Action("LogOn", "Account", new { area = "" })">Log On</a> } This partial View is called from with all pages in my MVC3 application, using @Html.Partial("_HeaderView")