Open sandboxFocus

Class CacheKeyBuilder

Builds cache item keys and dependency keys.

Inheritance
CacheKeyBuilder
Implements
Namespace: PostSharp.Patterns.Caching.Implementation
Assembly: PostSharp.Patterns.Caching.dll
Syntax
public class CacheKeyBuilder : IDisposable

Constructors

Name Description
CacheKeyBuilder()

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

CacheKeyBuilder(int)

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 object to an UnsafeStringBuilder.

AppendType(UnsafeStringBuilder, Type)

Appends a 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(bool)

Disposes the current object.

GetCachedMethodInfo(MethodInfo)

Gets the CachedMethodInfo for a given MethodInfo.