C# Class Flatwhite.OutputCacheAttribute

Inheritance: MethodFilterAttribute, ICacheSettings
ファイルを表示 Open project: vanthoainguyen/Flatwhite

Public Methods

Method Description
GetAllVaryCustomKey ( ) : string

Get all vary by custom string

OnMethodExecuted ( MethodExecutedContext methodExecutedContext ) : void

Save the return data from invocation to cache

OnMethodExecuting ( MethodExecutingContext methodExecutingContext ) : void

Check to see if the cache is available

OutputCacheAttribute ( ) : System

Default constructor for OutputCacheAttribute

SetCacheStrategy ( ICacheStrategy cacheStrategy ) : void

Set the custom cache strategy ICacheStrategy

Private Methods

Method Description
CreatePhoenix ( _IInvocation invocation, CacheItem cacheItem ) : void

Create the phoenix object which can refresh the cache itself if StaleWhileRevalidate > 0 and store by key in Global.Cache.Phoenix

RefreshCache ( string storedKey ) : void

Refresh cache cake by phoenix if StaleWhileRevalidate > 0 when AutoRefresh is not enabled

Method Details

GetAllVaryCustomKey() public method

Get all vary by custom string
public GetAllVaryCustomKey ( ) : string
return string

OnMethodExecuted() public method

Save the return data from invocation to cache
public OnMethodExecuted ( MethodExecutedContext methodExecutedContext ) : void
methodExecutedContext MethodExecutedContext
return void

OnMethodExecuting() public method

Check to see if the cache is available
public OnMethodExecuting ( MethodExecutingContext methodExecutingContext ) : void
methodExecutingContext MethodExecutingContext
return void

OutputCacheAttribute() public method

Default constructor for OutputCacheAttribute
public OutputCacheAttribute ( ) : System
return System

SetCacheStrategy() public method

Set the custom cache strategy ICacheStrategy
public SetCacheStrategy ( ICacheStrategy cacheStrategy ) : void
cacheStrategy ICacheStrategy
return void