MetalamaAPI documentationPatterns APIMetalama.​Patterns.​Caching.​AspectsInvalidate­Cache­AttributeInvalidate­Cache­Attribute
Open sandboxFocus

InvalidateCacheAttribute Constructor

InvalidateCacheAttribute(String[])

Initializes a new instance of the InvalidateCacheAttribute class that invalidates method of the same type as the type to which the current InvalidateCacheAttribute aspect is being applied.

Declaration
public InvalidateCacheAttribute(params string[] methodNames)
Parameters
Type Name Description
System.String[] methodNames

A list of names of methods to invalidate. All parameters of these methods (except those marked with NotCacheKeyAttribute) must have a parameter of the same name and compatible type in the target method of the current InvalidateCacheAttribute aspect.

InvalidateCacheAttribute(Type, String[])

Initializes a new instance of the InvalidateCacheAttribute class that invalidates method of a different type than the type to which the current InvalidateCacheAttribute aspect is being applied.

Declaration
public InvalidateCacheAttribute(Type declaringType, params string[] methodNames)
Parameters
Type Name Description
System.Type declaringType

The type containing the methods to invalidate.

System.String[] methodNames

A list of names of methods to invalidate. All parameters of these methods (except those marked with NotCacheKeyAttribute) must have a parameter of the same name and compatible type in the target method of the current InvalidateCacheAttribute aspect.