Open sandboxFocus

Class CacheParameterClassification

Represents the result of classifying a method parameter for cache key generation.

Inheritance
CacheParameterClassification
Namespace: Metalama.Patterns.Caching.Aspects.Configuration
Assembly: Metalama.Patterns.Caching.Aspects.dll
Syntax
[CompileTime]
public sealed class CacheParameterClassification
Remarks

This class is returned by GetClassification(IParameter) and determines how a parameter is handled by the caching aspect:

  • Default: The parameter is included in the cache key using standard formatting.
  • ExcludeFromCacheKey: The parameter is excluded from the cache key.
  • Ineligible(): The method cannot be cached because of this parameter (reports a compile-time error).

Properties

Name Description
Default

Gets a classification indicating that the parameter should be included in the cache key using standard formatting.

ExcludeFromCacheKey

Gets a classification indicating that the parameter should be excluded from the cache key. The NotCacheKeyAttribute will be automatically added to the parameter.

Methods

Name Description
Ineligible()

Creates a classification indicating that the method cannot be cached because of this parameter, with a default error diagnostic.

Ineligible(IDiagnostic)

Creates a classification indicating that the method cannot be cached because of this parameter, with a custom error diagnostic.

Extension Methods

See Also