Skip to content

Instantly share code, notes, and snippets.

Avatar

Alan Mac Kenna alanmac

View GitHub Profile
@alanmac
alanmac / UmbracoDonutOutputCacheAttribute.cs
Created Sep 18, 2015
This is a DonutOutputCache attribute extension that checks for use of Umbraco Doc Type Grid Editor. It's useful in the backoffice if Donut Output Caching is being used and it is throwing exceptions trying to cache DTGE in the backoffice
View UmbracoDonutOutputCacheAttribute.cs
/// <summary>
/// Used to stop Donut Caching from executing on the request if the Doc Type Grid Editor is being used in the backoffice
/// Put this attribute on the Controller/Method that is causing a problem in the backoffice.
/// e.g. [UmbracoDonutOutputCacheAttribute(CacheProfile = "FiveMin")]
// public ActionResult Home()
/// </summary>
public class UmbracoDonutOutputCacheAttribute : DonutOutputCacheAttribute
{
public override void OnActionExecuting(ActionExecutingContext filterContext)