Questions tagged [donut-caching]

Donut caching is a type of caching where most of the content is cached, with a little 'hole' of content that is not cached.

Donut caching refers to the type of caching that enable you to cache an entire page's output — while leaving a few dynamic region markers to indicate places in the HTML output where you want to dynamically "fill-in" content on later requests (for example: the current user's name).

Donut caching is the opposite of partial page caching — the type of caching that is more commonly used — where most of the page is not cached but select individual parts are cached.

33 questions
23
votes
2 answers

Donut caching _Layout with mvcdonutcaching ASP.NET MVC

In my ASP.NET MVC project, I have a login submenu in the navigation menu of my shared _Layout.cshtml file, displaying user info if the user is logged in, or signup/login options if not. The login submenu is a partial view in my shared folder named…
trashr0x
  • 6,457
  • 2
  • 29
  • 39
12
votes
2 answers

Can I use [CompressFilter] in ASP.NET MVC without breaking donut caching

I am trying to get [CompressFilter] working with donut caching and running into issues. What happens is that the whole page gets cached and not just the donut. The source for the CompressFilter I am using is below. I changed this from the original…
Simon_Weaver
  • 140,023
  • 84
  • 646
  • 689
12
votes
4 answers

Is Donut caching available in ASP.NET MVC 3

ASP.NET MVC 3 (final) was released today. When this version was in its infancy I remember reading on codeplex that donut caching was being considered. Does anyone know if this made it into V3? I cannot seem to find any information so I can only…
JP.
  • 5,536
  • 7
  • 58
  • 100
8
votes
1 answer

What's the current practice for partial caching in ASP MVC2?

My website pages are composed of two kinds of content. The first is variable between users but constant for all pages. The second is constant across users, but variable between pages. This is a common layout. What is the best way to apply output…
8
votes
1 answer

Turn off page-level caching in a user control

I have a page with the following caching defined: <%@ OutputCache Duration="60" VaryByParam="None" %> I have a user control inside that page that i don't want cached. How can I turn it off just for that control?
Micah
  • 111,873
  • 86
  • 233
  • 325
6
votes
4 answers

Donut Caching Tutorials

Can someone point out a couple of good quality tutorials/pages for donut caching? Like everything else on the web, you can google a million things, but several of the articles I've found are a bit confusing. I'm looking for What is donut…
Russell Steen
  • 6,494
  • 6
  • 38
  • 56
6
votes
1 answer

Donut hole caching - exclude MiniProfiler.RenderIncludes

I have an ASP.NET MVC action that is decorated with the OutputCache attribute, but the problem is that the MiniProfiler output is cached as well. I'd like to exclude the MiniProfiler output from the caching (donut hole), but I'm not sure how I can…
larsw
  • 3,790
  • 2
  • 25
  • 37
5
votes
1 answer

How do I 'donut cache' in ASP.NET MVC for something more than a date

All the examples for donut caching I've seen are just like this : <%= Html.Substitute( c => DateTime.Now.ToString() )%> Thats fine if I just want the date, but what other options are there? I know there is a delegate 'MvcSubstitutionCallback'…
Simon_Weaver
  • 140,023
  • 84
  • 646
  • 689
5
votes
3 answers

How to use ASP.Net server controls inside of Substitution control?

while the method we use in Substitution control should return strings, so how is it possible to use a donut caching in web forms on a server control which should be rendered server side? for example Loginview control?
mhmd
  • 995
  • 2
  • 15
  • 30
5
votes
2 answers

ASP.NET MVC 2 disable cache for browser back button in partial views

I am using Html.RenderAction(c => c.Show()); on my master Page to display the cart for all pages. The problem is when I add an item to the cart and then hit the browser back button. It shows the old cart (from Cache) until I hit the…
Maksymilian Majer
  • 2,956
  • 2
  • 29
  • 42
5
votes
2 answers

ASP .NET - Substitution and page output (donut) caching - How to pass custom argument to HttpResponseSubstitutionCallback delegate

I would like to use substitution feature of donut caching. public static string GetTime(HttpContext context) { return DateTime.Now.ToString("T"); } ... The cached time is: <%= DateTime.Now.ToString("T") %>
The substitution time is: <%…
zzare
  • 98
  • 2
  • 8
4
votes
1 answer

NullReferenceException in DevTrends.MvcDonutCaching.KeyGenerator.GenerateKey

I'm having the problem described by @Aviv in this post: http://www.devtrends.co.uk/blog/donut-output-caching-in-asp.net-mvc-3#125 I looked for the error here and on Codeplex but not found. The environment is Medium Trust! Route public static void…
ridermansb
  • 10,779
  • 24
  • 115
  • 226
4
votes
1 answer

MVCDonutCaching - Issues with child action when parent is not donut cached

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 =…
JP.
  • 5,536
  • 7
  • 58
  • 100
4
votes
0 answers

Avoid donut caching when user is logged in as admin in Forms Authentication?

I would like to avoid caching if the user is logged in with forms authentication in the admin group. I have overridden the cache attribute and have applied it at the controller level. However, the method NonAdmin does not get called via the…
4
votes
1 answer

Exclude Dynamic Rendered User Control From Output Caching

We have a site (actually an Application Builder) that rendered a lot of user controls in different scenarios, One day the manager decided to add Output cache in the main page, OK, every things is fine and the request responded very fast! But in…
Saeid
  • 13,224
  • 32
  • 107
  • 173
1
2 3