C# 클래스 Flatwhite.WebApi.OutputCacheAttribute

상속: System.Web.Http.Filters.ActionFilterAttribute, ICacheSettings
파일 보기 프로젝트 열기: vanthoainguyen/Flatwhite 1 사용 예제들

공개 메소드들

메소드 설명
GetAllVaryCustomKey ( ) : string

Get all vary by custom string

OnActionExecutedAsync ( System.Web.Http.Filters.HttpActionExecutedContext actionExecutedContext, CancellationToken cancellationToken ) : Task

Store the response to cache store, add CacheControl and Etag to response

OnActionExecutingAsync ( System.Web.Http.Controllers.HttpActionContext actionContext, CancellationToken cancellationToken ) : Task

Check CacheControl request, get CacheItem, build response and return if cache available

보호된 메소드들

메소드 설명
ApplyCacheHeaders ( HttpResponseMessage response, HttpRequestMessage request ) : void

Apply the CacheControl header to response

GetCacheResponseBuilder ( IDependencyScope scope ) : ICacheResponseBuilder

Get ICacheResponseBuilder from IDependencyScope

GetCacheStrategy ( IDependencyScope scope, _IInvocation invocation, object>.IDictionary invocationContext ) : ICacheStrategy

Get ICacheStrategy from IDependencyScope

GetInvocation ( System.Web.Http.Controllers.HttpActionContext actionContext ) : _IInvocation

Get _IInvocation from HttpActionContext

GetInvocationContext ( System.Web.Http.Controllers.HttpActionContext actionContext ) : object>.IDictionary

Get context data from HttpActionContext

HashCacheKey ( string originalCacheKey ) : string

Make a hash string of the original senstivive cacheKey

ShouldIgnoreCache ( CacheControlHeaderValue cacheControl, HttpRequestMessage request ) : bool

Determine whether or not should ignore all the cache settings base on the

비공개 메소드들

메소드 설명
CreatePhoenix ( _IInvocation invocation, WebApiCacheItem cacheItem, HttpRequestMessage request ) : void

Create the phoenix object which can refresh the cache itself if StaleWhileRevalidate > 0

GetHashString ( byte content ) : string
RefreshCache ( string storedKey ) : void

메소드 상세

ApplyCacheHeaders() 보호된 메소드

Apply the CacheControl header to response
protected ApplyCacheHeaders ( HttpResponseMessage response, HttpRequestMessage request ) : void
response System.Net.Http.HttpResponseMessage
request System.Net.Http.HttpRequestMessage
리턴 void

GetAllVaryCustomKey() 공개 메소드

Get all vary by custom string
public GetAllVaryCustomKey ( ) : string
리턴 string

GetCacheResponseBuilder() 보호된 메소드

Get ICacheResponseBuilder from IDependencyScope
protected GetCacheResponseBuilder ( IDependencyScope scope ) : ICacheResponseBuilder
scope IDependencyScope
리턴 ICacheResponseBuilder

GetCacheStrategy() 보호된 메소드

Get ICacheStrategy from IDependencyScope
protected GetCacheStrategy ( IDependencyScope scope, _IInvocation invocation, object>.IDictionary invocationContext ) : ICacheStrategy
scope IDependencyScope
invocation _IInvocation
invocationContext object>.IDictionary
리턴 ICacheStrategy

GetInvocation() 보호된 메소드

Get _IInvocation from HttpActionContext
protected GetInvocation ( System.Web.Http.Controllers.HttpActionContext actionContext ) : _IInvocation
actionContext System.Web.Http.Controllers.HttpActionContext
리턴 _IInvocation

GetInvocationContext() 보호된 메소드

Get context data from HttpActionContext
protected GetInvocationContext ( System.Web.Http.Controllers.HttpActionContext actionContext ) : object>.IDictionary
actionContext System.Web.Http.Controllers.HttpActionContext
리턴 object>.IDictionary

HashCacheKey() 보호된 메소드

Make a hash string of the original senstivive cacheKey
protected HashCacheKey ( string originalCacheKey ) : string
originalCacheKey string
리턴 string

OnActionExecutedAsync() 공개 메소드

Store the response to cache store, add CacheControl and Etag to response
public OnActionExecutedAsync ( System.Web.Http.Filters.HttpActionExecutedContext actionExecutedContext, CancellationToken cancellationToken ) : Task
actionExecutedContext System.Web.Http.Filters.HttpActionExecutedContext
cancellationToken System.Threading.CancellationToken
리턴 Task

OnActionExecutingAsync() 공개 메소드

Check CacheControl request, get CacheItem, build response and return if cache available
public OnActionExecutingAsync ( System.Web.Http.Controllers.HttpActionContext actionContext, CancellationToken cancellationToken ) : Task
actionContext System.Web.Http.Controllers.HttpActionContext
cancellationToken System.Threading.CancellationToken
리턴 Task

ShouldIgnoreCache() 보호된 메소드

Determine whether or not should ignore all the cache settings base on the
protected ShouldIgnoreCache ( CacheControlHeaderValue cacheControl, HttpRequestMessage request ) : bool
cacheControl System.Net.Http.Headers.CacheControlHeaderValue
request System.Net.Http.HttpRequestMessage
리턴 bool