Custom attribute that, when applied on a method, causes an invocation of this method to remove from the cache the result of invocations of other given methods with the same parameter values.
Inheritance
Implements
Namespace: PostSharp.Patterns.Caching
Assembly: PostSharp.Patterns.Caching.dll
Syntax
[MulticastAttributeUsage(MulticastTargets.Method, AllowMultiple = true)]
[Metric("UsedFeatures", "Patterns.Caching.InvalidateCache")]
[ProvideAspectRole("CacheInvalidation")]
[AspectRoleDependency(AspectDependencyAction.Order, AspectDependencyPosition.After, "Validation")]
[AspectRoleDependency(AspectDependencyAction.Order, AspectDependencyPosition.After, "Tracing")]
[LinesOfCodeAvoided(1)]
[Serializer(typeof(InvalidateCacheAttribute.Serializer))]
public sealed class InvalidateCacheAttribute : MethodInterceptionAspect, IMethodLevelAspectBuildSemantics, IAspectBuildSemantics, IValidableAnnotation, IAsyncMethodInterceptionAspect, IMethodInterceptionAspect, IMethodLevelAspect, IAspect
Constructors
Name | Description |
---|---|
InvalidateCacheAttribute(PortableFormatterConstructorContext) | |
InvalidateCacheAttribute(params string[]) | Initializes a new InvalidateCacheAttribute that invalidates method of the same type as the type to which the current InvalidateCacheAttribute aspect is being applied. |
InvalidateCacheAttribute(Type, params string[]) | Initializes a new InvalidateCacheAttribute that invalidates method of a different type than the type to which the current InvalidateCacheAttribute aspect is being applied. |
Properties
Name | Description |
---|---|
AllowMultipleOverloads | Determines whether the current InvalidateCacheAttribute can match several overloads of the methods.
The default value is |