Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Caching Namespace / Cache­Configuration­Attribute Class

CacheConfigurationAttribute Class

Custom attribute that, when applied on a type, configures the CacheAttribute aspects applied to the methods of this type or its derived types. When applied to an assembly, the CacheConfigurationAttribute custom attribute configures all methods of the current assembly.
Inheritance Hierarchy
System.Object
  System.Attribute
    PostSharp.Patterns.Caching.CacheConfigurationAttribute

Namespace:  PostSharp.Patterns.Caching
Assembly:  PostSharp.Patterns.Caching (in PostSharp.Patterns.Caching.dll) Version: 5.0.38.0 (5.0.38.0)
Syntax
C#
public sealed class CacheConfigurationAttribute : Attribute

The CacheConfigurationAttribute type exposes the following members.

Constructors
  NameDescription
Public methodCacheConfigurationAttribute
Initializes a new instance of the CacheConfigurationAttribute class
Properties
  NameDescription
Public propertyAbsoluteExpiration
Gets or sets the total duration, in minutes, during which the result of the cached method is stored in cache. The absolute expiration time is counted from the moment the method is evaluated and cached.
Public propertyAutoReload
Determines whether the method calls are automatically reloaded (by re-evaluating the target method with the same arguments) when the cache item is removed from the cache.
Public propertyIgnoreThisParameter
Determines whether the this instance should be a part of the cache key. The default value of this property is false, which means that by default the this instance is a part of the cache key.
Public propertyPriority
Gets or sets the priority of the cached method.
Public propertyProfileName
Gets or sets the name of the CachingProfile that contains the configuration of the cached methods.
Public propertySlidingExpiration
Gets or sets the duration, in minutes, during which the result of the cached method is stored in cache after it has been added to or accessed from the cache. The expiration is extended every time the value is accessed from the cache.
Extension Methods
  NameDescription
Public Extension MethodQueryInterface<T>
Gets the implementation of a specified interface for the specified object.
(Defined by QueryInterfaceExtensions.)
Remarks

Any CacheConfigurationAttribute on the base class has always priority over a CacheConfigurationAttribute on the assembly, even if the base class is in a different assembly.

See Also