Skip to content

Instantly share code, notes, and snippets.

@kevinbrechbuehl
Created June 24, 2015 16:18
Show Gist options
  • Save kevinbrechbuehl/9f3797c326a04646ec98 to your computer and use it in GitHub Desktop.
Save kevinbrechbuehl/9f3797c326a04646ec98 to your computer and use it in GitHub Desktop.
Disable Glass Mapper Cache
/// <summary>
/// Disables the cache for Glass Mapper. This is used for the content management server
/// as we don't want to use it here.
/// </summary>
public class DisableGlassMapperCache
{
/// <summary>
/// Processes the specified arguments.
/// </summary>
/// <param name="args">The arguments.</param>
public virtual void Process(PipelineArgs args)
{
DisableCache.Current = CacheSetting.Disabled;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment