C# Class Flatwhite.Provider.DefaultCacheKeyProvider

Default cache key provider
Inheritance: ICacheKeyProvider
Show file Open project: vanthoainguyen/Flatwhite Class Usage Examples

Protected Properties

Property Type Description
_hashCodeGeneratorProvider IHashCodeGeneratorProvider

Public Methods

Method Description
DefaultCacheKeyProvider ( IHashCodeGeneratorProvider hashCodeGeneratorProvider = null ) : System

Initialize a default cache key provider using IHashCodeGeneratorProvider

GetCacheKey ( _IInvocation invocation, object>.IDictionary invocationContext ) : string

Resolve cache key

GetRevalidateKey ( _IInvocation invocation, string keyFormat ) : string

Build the revalidation key from provided keyFormat

Protected Methods

Method Description
BuildWithCustom ( string prefixKey, object>.IDictionary invocationContext, string customKey, StringBuilder key ) : void

Build the key with provided customKey

BuildWithParams ( _IInvocation invocation, ParameterInfo parameters, string varyByParams, StringBuilder key ) : void

Build the key with provided varyByParams

Method Details

BuildWithCustom() protected method

Build the key with provided customKey
protected BuildWithCustom ( string prefixKey, object>.IDictionary invocationContext, string customKey, StringBuilder key ) : void
prefixKey string
invocationContext object>.IDictionary
customKey string
key StringBuilder
return void

BuildWithParams() protected method

Build the key with provided varyByParams
protected BuildWithParams ( _IInvocation invocation, ParameterInfo parameters, string varyByParams, StringBuilder key ) : void
invocation _IInvocation
parameters System.Reflection.ParameterInfo
varyByParams string
key StringBuilder
return void

DefaultCacheKeyProvider() public method

Initialize a default cache key provider using IHashCodeGeneratorProvider
public DefaultCacheKeyProvider ( IHashCodeGeneratorProvider hashCodeGeneratorProvider = null ) : System
hashCodeGeneratorProvider IHashCodeGeneratorProvider
return System

GetCacheKey() public method

Resolve cache key
public GetCacheKey ( _IInvocation invocation, object>.IDictionary invocationContext ) : string
invocation _IInvocation
invocationContext object>.IDictionary
return string

GetRevalidateKey() public method

Build the revalidation key from provided keyFormat
public GetRevalidateKey ( _IInvocation invocation, string keyFormat ) : string
invocation _IInvocation
keyFormat string
return string

Property Details

_hashCodeGeneratorProvider protected property

Hashcode generator provider
protected IHashCodeGeneratorProvider _hashCodeGeneratorProvider
return IHashCodeGeneratorProvider