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
3
votes
2 answers

ASP.NET 'Donut Caching' not working

I have an ASP.NET page where I am trying to do some output caching, but ran into a problem. My ASPX page has <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="MYProject._Default" %> <%@ OutputCache Duration="600"…
Shyju
  • 214,206
  • 104
  • 411
  • 497
3
votes
2 answers

Is there a way to access the current session from within a substitution control?

Looks like context parameter of asp:net substitution control method is missing the current session once the page is output cached. Aside from getting the substitution control's content thru ajax or using some other method to store data that would…
teddy
  • 31
  • 1
2
votes
0 answers

How to Donut Cache a Partial View on Site.Master?

I'm trying to use donut-caching on the Site.Master page for things like the User Login and Shopping Cart, so that we can put OutputCache on some of the more resource intensive pages in our app. Currently, I'm using the tag and then writing out the…
marcel_g
  • 1,980
  • 2
  • 17
  • 19
2
votes
0 answers

Best MVC views Caching Policy (OutputCache Policy) in large amount of data (views)

I'm using DonuteCache (DonutOutputCache attribute which is better and more optimized than default MVC OutputCache attribute).I usually cache my views by one or more parameters so if the parameters was so vary I'd have lots of view to be cached. In…
2
votes
2 answers

Mvc Donut Caching disable caching programmatically

I'm using MvcDonutCaching on my project and looking for a way to disable caching globally to assist during debugging/testing. I can't find any examples on how to achieve this in the documentation though I did find the CacheSettingsManager which…
DGibbs
  • 14,316
  • 7
  • 44
  • 83
2
votes
1 answer

Caching in ASP.NET MVC with uncachable forms

I'm doing donut caching with the MVCDonutCaching library. Background to donut caching using this library: The way it works, is you can cache a view, but exclude part of it from being cached, i.e. the "donut hole". You do this by having the…
h bob
  • 3,610
  • 3
  • 35
  • 51
2
votes
1 answer

DonutOutputCache not working for an image

I have an ASP.NET MVC controller action like the following: [HttpGet] [DonutOutputCache(CacheProfile = "banner")] public async Task Banner(string name, string size = "lg") { // snipped - work out which banner to show today. …
sheikhjabootie
  • 7,308
  • 2
  • 35
  • 41
1
vote
2 answers

MVCDonutCaching failing when using custom Redis output cache provider

I have the following custom Redis output cache: public class CustomRedisOutputCache : RedisOutputCacheProvider { public override object Add(string key, object entry, DateTime utcExpiry) { if (!HttpContextHelper.IsPreview()) …
Pete
  • 57,112
  • 28
  • 117
  • 166
1
vote
1 answer

What causes d:\ drive to be unavailable in web app on Azure?

Once in a blue moon, we get an exception from our Azure web app when initializing the cache. The error message states Failed to start monitoring changes to 'D:\home\site'. A redeploy resolved the issue. We are using MvcDonutCaching, but I do not…
Øyvind Skaar
  • 1,842
  • 14
  • 22
1
vote
1 answer

How to set a partial view as donut hole in ASP MVC

i have installed mvcdonutcaching from GitHub and included it in my MVC Project i have the Index Action for Home Controller and i am successfully using Caching on it [DonutOutputCache(Duration = 24 * 60 * 60, Location =…
Asad Ali
  • 111
  • 2
  • 7
1
vote
1 answer

Prevent Image Caching in MVC 2 C#

I have a profile image upload page, where users can overwrite their previous profile picture. But when I return the users to their profile page the browser has cached their previous image and only an F5 refresh returns the new image. Is it possible…
beebul
  • 993
  • 1
  • 16
  • 37
1
vote
1 answer

MVC Donut Caching not working as expected once deployed online

We are using MVC Donut Caching and have been all day trying to debug this problem which I still didn't manage to find a solution. We have opted to start using the DonutOutputCache attribute over the OutputCache and through logging have noticed that…
Mark Cassar
  • 1,842
  • 4
  • 20
  • 27
1
vote
1 answer

Store pageview when page is cached using outputcache

I have a page which I cache for hours using outputcaching. However, I still want to log each pageview in my database. It is quite important I get access to my codebehind, as I will use these data to show personalized data. So my outputcache…
Lars Holdgaard
  • 9,496
  • 26
  • 102
  • 182
0
votes
1 answer

Selective browser caching (ie donut) based on html tag/other no ASP?

Assume I use no library or framework, just plain vanilla HTML5, CSS3 and ES6 that every modern browser affords me. Is there something similar to ASP's donut hole caching where I can instruct the client's browser not to cache specific html within a…
0
votes
1 answer

Remove ChildAction from OutPutCache in MVC 5?

I'm developing a website with MVC 5.2.3, it has a top menu bar in _Layout.cshtml that contains logged in user information. Like user's FullName, so it shouldn't be cache. For exclude this menu from OutPutCache, I created a child action for…
Mohammad Dayyan
  • 21,578
  • 41
  • 164
  • 232