Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save davidknipe/d17dffe6a05171ee91f2 to your computer and use it in GitHub Desktop.

Select an option

Save davidknipe/d17dffe6a05171ee91f2 to your computer and use it in GitHub Desktop.
Debugger aware ContentOutputCacheAttribute for EPiServer - only output caches if a debugger is not attached
public class DebugAwareContentOutputCacheAttribute : ContentOutputCacheAttribute
{
public override bool Disable
{
get
{
if (System.Diagnostics.Debugger.IsAttached)
{
return true;
}
else
{
return base.Disable;
}
}
set
{
base.Disable = value;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment