C# Class Flatwhite.Strategy.DefaultCacheStrategy

Default strategy which will enable cache for methods with OutputCacheAttribute decorated
Inheritance: ICacheStrategy
显示文件 Open project: vanthoainguyen/Flatwhite

Private Properties

Property Type Description

Public Methods

Method Description
CanCache ( _IInvocation invocation, object>.IDictionary invocationContext ) : bool

Determine whether it can intercept the invocation

GetAsyncCacheStore ( _IInvocation invocation, object>.IDictionary invocationContext ) : IAsyncCacheStore

Get IAsyncCacheStore for current invocation and context

GetCacheStore ( _IInvocation invocation, object>.IDictionary invocationContext ) : ICacheStore

Get ICacheStore for current invocation and context

GetChangeMonitors ( _IInvocation invocation, object>.IDictionary invocationContext ) : IEnumerable

Get empty list change monitor

Protected Methods

Method Description
CanCacheNoneVirtualOrFinalMethods ( ) : bool

Dynamic proxy doesn't work for none virtual or final methods so this is false by default. However, derive of this class such as WebApiCacheStrategy can ignore this because WebAPI doesn't use dynamic proxy

Method Details

CanCache() public method

Determine whether it can intercept the invocation
public CanCache ( _IInvocation invocation, object>.IDictionary invocationContext ) : bool
invocation _IInvocation
invocationContext object>.IDictionary
return bool

CanCacheNoneVirtualOrFinalMethods() protected method

Dynamic proxy doesn't work for none virtual or final methods so this is false by default. However, derive of this class such as WebApiCacheStrategy can ignore this because WebAPI doesn't use dynamic proxy
protected CanCacheNoneVirtualOrFinalMethods ( ) : bool
return bool

GetAsyncCacheStore() public method

Get IAsyncCacheStore for current invocation and context
public GetAsyncCacheStore ( _IInvocation invocation, object>.IDictionary invocationContext ) : IAsyncCacheStore
invocation _IInvocation
invocationContext object>.IDictionary
return IAsyncCacheStore

GetCacheStore() public method

Get ICacheStore for current invocation and context
public GetCacheStore ( _IInvocation invocation, object>.IDictionary invocationContext ) : ICacheStore
invocation _IInvocation
invocationContext object>.IDictionary
return ICacheStore

GetChangeMonitors() public method

Get empty list change monitor
public GetChangeMonitors ( _IInvocation invocation, object>.IDictionary invocationContext ) : IEnumerable
invocation _IInvocation
invocationContext object>.IDictionary
return IEnumerable