Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6958649
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:10:03+00:00 2026-05-27T15:10:03+00:00

I am using the awesom MVCDonutCaching package from Nuget in order to cache entire

  • 0

I am using the awesom MVCDonutCaching package from Nuget in order to cache entire pages while leaving certain portions uncached. The process is simple and everything works as it should:

I am caching as follows:

[DonutOutputCache(CacheProfile = "FiveMins")]
public ActionResult Index()
{
  return View();
}

For the section of my page I do not wish to cache I am doing the following:

  @Html.Action("HeaderLinks","Home", true)

This works as it should and indeed the bulk of the page is cached but my header links – context sensitive links displaying a log on button if the user is not logged in, their username if they are, etc. – is not cached. So far everything works.

The problem that I am having is that the headerlinks belong to a master/layout page and are used across the board – regardless of whether an Action has a DonutOutputCache attribute set or not. When I create another action, let’s call it ‘about us’, without a donut caching attribute I do not see my header links at all

public ActionResult AboutUs()
{
  return View();
}

Looking at the source code I see the following

<!--Donut#
<ActionSettings xmlns="http://schemas.datacontract.org/2004/07/DevTrends.MvcDonutCaching" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<ActionName>HeaderLinks</ActionName>
<ControllerName>Home</ControllerName>
<RouteValues xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<a:KeyValueOfstringanyType>
<a:Key>Area</a:Key>
<a:Value i:type="b:string" xmlns:b="http://www.w3.org/2001/XMLSchema"/>
</a:KeyValueOfstringanyType>
</RouteValues>
</ActionSettings>
#-->

Obviously in the above example, which is generated by the donut caching library – the links section is replaced by some commented XML.

My question in a nutshell is: is it possible with this library to reuse the same child action regardless of whether the parent action is using donut caching or not?

Any help would be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T15:10:04+00:00Added an answer on May 27, 2026 at 3:10 pm

    Currently you are required to use the Html.Action together with the DonutOutputCache action filter in order to get the donut hole to render. If you use the Html.Action without the DonutOutputCache, you will see the placeholder comment that you have outlined above.

    This is an oversight though and will be addressed in the next release.

    see http://mvcdonutcaching.codeplex.com/workitem/2388

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The following script works to open Firefox's location/awesome bar from anywhere using control-l ,
I'm pulling data from an XML feed and manipulating it using the awesome SimpleXMLElement.
I have very interested in using MongoDB it seems awesome. But I'm from a
i've been using this awesome plugin from janko http://www.jankoatwarpspeed.com/post/2009/06/01/Advanced-docking-using-jQuery.aspx the only problem is, i
I'm using Font-Awesome, but while the font files are not loaded, the icons appear
I'm using the awesome cache-money gem with a large rails project. I frequently get
I'm using the NSFetchResultsControlleDelegate Methods from this awesome Post: http://iphonedevelopment.blogspot.com/2009/11/i-know-youre-tired-of-hearing-about.html However: I have the
I'm using turn.js from github which is awesome. They have one method that lets
I am using this awesome code from @Richard aka cyberkiwi to run a query
Possible Duplicate: passing variables from php to javascript I am using this awesome jQuery

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.