C# Class Solita.Episerver.WebApi.Attributes.EpiserverWebApiOutputCacheAttribute

OutputCacheAttribute for Web API that invalidates the cache when Episerver content changes. Caching is disabled in debug-mode (<compilation debug="true"> in web.config) by default.
Inheritance: System.Web.Http.Filters.ActionFilterAttribute
Datei anzeigen Open project: solita/episerver-webapi

Private Properties

Property Type Description
CreateCacheEvictionPolicy CacheEvictionPolicy
CreateCacheKey string
GetCache IObjectInstanceCache
IsCacheable bool

Public Methods

Method Description
EpiserverWebApiOutputCacheAttribute ( int durationSeconds ) : System
OnActionExecuted ( System.Web.Http.Filters.HttpActionExecutedContext ac ) : void
OnActionExecuting ( System.Web.Http.Controllers.HttpActionContext ac ) : void

Private Methods

Method Description
CreateCacheEvictionPolicy ( ) : CacheEvictionPolicy
CreateCacheKey ( HttpRequestMessage request ) : string
GetCache ( ) : IObjectInstanceCache
IsCacheable ( HttpMethod method ) : bool

Method Details

EpiserverWebApiOutputCacheAttribute() public method

public EpiserverWebApiOutputCacheAttribute ( int durationSeconds ) : System
durationSeconds int Cache duration in seconds
return System

OnActionExecuted() public method

public OnActionExecuted ( System.Web.Http.Filters.HttpActionExecutedContext ac ) : void
ac System.Web.Http.Filters.HttpActionExecutedContext
return void

OnActionExecuting() public method

public OnActionExecuting ( System.Web.Http.Controllers.HttpActionContext ac ) : void
ac System.Web.Http.Controllers.HttpActionContext
return void