I have the following Action in a controller marked with [ChildActionOnly]
:
[OutputCache(Duration = 3600)]
public PartialViewResult SideNavigation()
{
SideNavigationModel model = _sideNavigationFactory.GetSideNavigation();
if (model != null)
{
return PartialView(model);
}
return default(PartialViewResult);
}
Which works fine when I call it with:
@Html.Action("SideNavigation", "Template")
In my main template. However I have noticed that when I update the cshtml file of the side navigation, it does not update on the webpage even though my output caching is disabled in the web.config:
<outputCache enableOutputCache="false">
If I change the main template this is on, that will update but the navigation part of the template won't. Is this expected behaviour? If so is there a way to output cache it only when output caching is enabled?