Sections marked as don't cache are caching.

May 25, 2012 at 4:28 PM

Hello there,

When I add the DonutOutputCache attribute to an action, it works fine in caching the whole action, but the problem comes when we have Html.Actions on that page or in that pages Layout (@Html.Action("AccountHeader", "Home", true) for example.) Even though it is set to true, it is still caching the action result, even though there is no cache attribute on that particular action.

 

Is there a different way this should be done? Do we have to add a cache attribute with 0 as the time in order to keep it from caching? Things work fine when you do add the duration of 0 attribute to those actions, but shouldn't you not have to do that?