PostSharpAPI ReferencePost­Sharp.​Patterns.​Caching.​ImplementationCache­Key­Builder
Open sandboxFocus

CacheKeyBuilder Class

Builds cache item keys and dependency keys.

Inheritance
System.Object
CacheKeyBuilder
Implements
IDisposable
Namespace: PostSharp.Patterns.Caching.Implementation
Assembly: PostSharp.Patterns.Caching.dll
Syntax
[HasInheritedAttribute(new long[]{})]
public class CacheKeyBuilder : Object

Constructors

Name Description
CacheKeyBuilder()

Initializes a new CacheKeyBuilder with a default maximal key size of 2048 characters.

CacheKeyBuilder(Int32)

Initializes a new CacheKeyBuilder and specifies the maximal key size.

Properties

Name Description
IgnoredParameterSentinel

A sentinel object that means that the parameter is not a part of the cache key, and should be ignored.

MaxKeySize

Gets the maximal number of characters in cache keys.

Methods

Name Description
AppendArgument(UnsafeStringBuilder, Type, Object)

Appends a method argument to an UnsafeStringBuilder. To avoid ambiguities between different overloads of the same method, the default implementation appends both the parameter type and the value key.

AppendMethod(UnsafeStringBuilder, MethodInfo)

Appends the method name and generic arguments to an UnsafeStringBuilder.

AppendObject(UnsafeStringBuilder, Object)

Appends a string representing an System.Object to an UnsafeStringBuilder.

AppendType(UnsafeStringBuilder, Type)

Appends a System.Type name to an UnsafeStringBuilder.

BuildDependencyKey(Object)

Builds a dependency key for a given object.

BuildMethodKey(MethodInfo, IList<Object>, Object)

Builds a cache key for a given method call.

Dispose()
Dispose(Boolean)

Disposes the current object.

GetCachedMethodInfo(MethodInfo)

Gets the CachedMethodInfo for a given System.Reflection.MethodInfo.